Tests for the Regression Line

  • Is there a correlation?
H0 r=0 b=0
H1 r≠0 b≠0
  • Is the y intercept = 0

    • H0: a = 0

    • H1: a ≠ 0

Conditions for Hypothesis Testing

  • Linearity

    • Linear relationship between x and y
  • Constant Variability (homoscedasticity)

  • Normality

    • The residuals should be normally distributed (from Histogram and QQ plot)

    Histogramm, QQ Plot density curve (gaussian kernel) of Allianz log
losses -0.15 -0.10 -0.05 o oo 0.05 010 015 Theoretical Quantiles

  • Independence

    • All the Y are independent

Hypothesis Testing

n 2— n ,2— z»oegq-o «را ود - ن •ى (T) مى ى ؛ملا ه ت على ت 2-٥ لاتوج
 هحاe،ع:مى

Practice Question 1

A teacher asked her students to record the total amount Of time they spent studying for a particular test.

The amounts of study time x (in hours) and the resulting test grades y are given below

x 2 1 1.5 0.5 1 3
y 92 81 84 68 85 96
  1. Obtain the equation of the least-squares regression line and the correlation.

    П-84 PWs Stvv TEXA.s

    ![П-84 PIus Stver Editj(n ф TEns [NSTRUMENTS гоямдтп си: ](./media/image275.png)

    • y = 69.7 + 9.75x

    • r = 0.896 (strong correlation)

    • r2 = 0.803 (80.3% of the change in grade can be explained by the study time)

  1. Explain in words what the slope b of the least-squares line says about hours studied a nd grade awarded.

    • For every 1 hour increase in study time, the grade is expected to go up by 9.75 points
  2. Test the hypothesis that the amount of study time is correlated to the test grade

    • Data
L1 L2 L3 L4
x y y hat Residual
  • Hypothesis

    C:\\6432CA65\\FE01530B-89BD-4F8B-A3E1-55F12080AD12\_files\\image276.png

  • Conditions

    • Linearity

    Tl-B4 mus Silver Ecfitjm TEXAS INSTRUMENTS FORMAT n

    П-84 пи, nx•.s а еоа-матп п

  • Constant Variance

    Tl-B4 mus Silver Editjm TEXAS INSTRUMENTS FORMAT n

    lNSTRll“ENTS

  • Normal Residuals

    Tl-B4 Pius Sirva E-åt•on TEXAS Xl ist:Lh STAT F'

    に 山 冨 第 ー 、 0 に 1 \! ′ ・ に 当 の 1 に 10 一 ま - 19 L 菱 】 山 あ ゝ ラ ・ 8 ー -
ト

  • Independence: each observation is independent

  • Calculate

    C:\\6432CA65\\FE01530B-89BD-4F8B-A3E1-55F12080AD12\_files\\image283.png

  • Interpret

    • So we reject the null hypothesis and have evidence to support the claim that the slope is not equal to zero. There is a correlation between study time and test grades
  1. What is the 95% confidence interval of the slope?

    • Equation

    (999.\*9

    • Calculate

    Tl-B4 Pius Silver Editjm TEXAS INSTRUMENTS FORMAT n

    Tl-84 Pius Silver TEXAS INSTRUMENTS Xlist:L1 Y list:L2 C-Leve1 . 95
REEQ: Calcul ate FORMAT

    ![П-В4 Pius Stver Editj(n ф TEns [NSTRUMENTS тамдта ](./media/image287.png)

    • Interpret

      • We are 95% confident that on average, for every 1 hour increase in study time, the final grade will go up between 3.05 and 16.45 points

Interpreting Computer Output

Analysi3 Of Var lance Regression Analysis: Final versus Quiz Average
 The regression equation is = 12. I + 0.751 Quiz Average 94.3 Constant
 Quiz Average = 9.71152 s Coef 12. 12 0.7513 SE coef 11 .94 0.1414 1.01
 s .31 R—Sq ( adj 0.315 0.000 R-sq = 37.0' So ur ce Re gr n Residual
 Error To tai 28.24 = 35.78 o. 000 1 48 49 SS 2663.7 4527.1 7190.7
 2663.7

y ニ に ・ に 十 . フ 引 ) こ K )

Practice Question 2

An economics professor wishes to analyze whether a person's income can predict the cost of their car

S 12.222S coet 432 . 525 c.sr.'S R-sq SE coet 3.341 o. 02325 131.25
 22.00 o. 000 o. ozo 90. eg

  • What's the least-squares regression equation

    • y hat = 438.535 + 0.511 * x

    • y = cost of car

    • x = income

  • What is the standard error about the line (aka the standard deviation of the regression model)? Interpret this value in context

    • On average, we expect our prediction of cost is off by 12.22.
  • Interpret the slope of the least-squares regression line in the context of this problem

    • For every $1 increase in income, car cost increases, on average, $0.51
  • What are the null and alternative hypotheses to test if there is an association between income and car cost?

    • 0 戶 0
  • What is the value of the test statistic for testing the hypotheses

    • C:\\6432CA65\\FE01530B-89BD-4F8B-A3E1-55F12080AD12\_files\\image292.png
  • What is the P-value for the test

    • P < 0.001
  • Is income useful for predicting the cost of a person's car? Use a significance level of 0.01. Explain briefly

    • 了 洋 ~ ? レ C\# 40S 十 - ・ エ 0 , 物 Joes p ?

Practice Question 3

Test if the number of beers is associated with the BAC

The regression - 0.0127 equation is 0.0180 Beers Cons t ant Bee rs s
 0.02044 Coe: -0.01270 0.017964 R-Sq StDev o. 01264 o. 002402

二 7 8

results matching ""

    No results matching ""