Login
📚 Statistics with Technology 2e
Chapters ▾
⇩ Download ▾

10.3 Inference for Regression and Correlation

How do you really say you have a correlation? Can you test to see if there really is a correlation? Of course, the answer is yes. The hypothesis test for correlation is as follows:

Hypothesis Test for Correlation:

  1. State the random variables in words.
    x = independent variable
    y = dependent variable
  2. State the null and alternative hypotheses and the level of significance
    Ho:ρ=0 (There is no correlation) HA:ρ0 (There is a correlation)  or HA:ρ<0 (There is a negative correlation)  or HA:ρ>0 (There is a postive correlation) 
    Also, state your α level here.
  3. State and check the assumptions for the hypothesis test
    The assumptions for the hypothesis test are the same assumptions for regression and correlation.
  4. Find the test statistic and p-value
    t=r1r2n2
    with degrees of freedom = df = n - 2
    p-value: Using the TI-83/84: tcdf(lower limit, upper limit, df) Using R: pt(t, df)
  5. Conclusion
    This is where you write reject Ho or fail to reject Ho. The rule is: if the p-value < α, then reject Ho. If the p-value α, then fail to reject Ho.
  6. Interpretation
    This is where you interpret in real world terms the conclusion to the test. The conclusion for a hypothesis test is that you either have enough evidence to show HA is true, or you do not have enough evidence to show HA is true.

Prediction Interval

Using the regression equation you can predict the number of calories from the alcohol content. However, you only find one value. The problem is that beers vary a bit in calories even if they have the same alcohol content. It would be nice to have a range instead of a single value. The range is called a prediction interval. To find this, you need to figure out how much error is in the estimate from the regression equation. This is known as the standard error of the estimate.

This formula is hard to work with, so there is an easier formula. You can also find the value from technology, such as the calculator.

s e = S S y b * S S x y n 2

If you want to know how to calculate the standard error of the estimate from the formula, refer to Example 3.

Prediction Interval for an Individual y

Given the fixed value x0, the prediction interval for an individual y is

y ^ E < y < y ^ + E

where

y ^ = a + b x E = t c s e 1 + 1 n + ( x o x ) 2 S S x d f = n 2

You can get the standard deviation from technology.
R will produce the prediction interval for you. The commands are (Note you probably already did the lm.out command. You do not need to do it again.)
lm.out = lm(dependent variable ~ independent variable) – calculates the linear model
predict(lm.out, newdata=list(independent variable = value), interval="prediction", level=C) – will compute a prediction interval for the independent variable set to a particular value (put that value in place of the word value), at a particular C level (given as a decimal)

Homework

Data Source:

Brain2bodyweight. (2013, November 16). Retrieved from http://wiki.stat.ucla.edu/socr/index...ain2BodyWeight

Calories in beer, beer alcohol, beer carbohydrates. (2011, October 25). Retrieved from www.beer100.com/beercalories.htm

Capital and rental values of Auckland properties. (2013, September 26). Retrieved from http://www.statsci.org/data/oz/rentcap.html

Data hotdogs. (2013, November 16). Retrieved from http://wiki.stat.ucla.edu/socr/index...D_Data_HotDogs

Fertility rate. (2013, October 14). Retrieved from http://data.worldbank.org/indicator/SP.DYN.TFRT.IN

Health expenditure. (2013, October 14). Retrieved from http://data.worldbank.org/indicator/SH.XPD.TOTL.ZS

Life expectancy at birth. (2013, October 14). Retrieved from http://data.worldbank.org/indicator/SP.DYN.LE00.IN

MLB heightsweights. (2013, November 16). Retrieved from http://wiki.stat.ucla.edu/socr/index...HeightsWeights

OECD economic development. (2013, December 04). Retrieved from lib.stat.cmu.edu/DASL/Datafiles/oecdat.html

Passenger car mileage. (2013, December 04). Retrieved from lib.stat.cmu.edu/DASL/Datafiles/carmpgdat.html

Prediction of height from metacarpal bone length. (2013, September 26). Retrieved from http://www.statsci.org/data/general/stature.html

Pregnant woman receiving prenatal care. (2013, October 14). Retrieved from http://data.worldbank.org/indicator/SH.STA.ANVC.ZS

Smoking and cancer. (2013, December 04). Retrieved from lib.stat.cmu.edu/DASL/Datafil...cancerdat.html