- 57 Views
- Uploaded on
- Presentation posted in: General

My last name starts with a letter somewhere between A. A – D B. E – L C. M – R D. S – Z

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Please click in

Homework due next class - April 19th

- ANOVA Project

My last name starts with a

letter somewhere between

A. A – D

B. E – L

C. M – R

D. S – Z

Homework due April 21st

- Correlation and Regression Using Excel

Be sure that your Class ID is on your homework

Hand in your homework

Please double check – All cell phones other electronic devices are turned off and stowed away

Turn your clicker on

Welcome

Please double check – All cell phones other electronic devices are turned off and stowed away

http://www.thedailyshow.com/video/index.jhtml?videoId=188474&title=an-arab-family-man

Use this as your

study guide

Logic of hypothesis testing with correlations

Interpreting correlations and scatterplots

Conducting tests of significance for correlational data

Introduction to Regression

A note regarding

empowerment

Readings for next exam

Lind

Chapter 13: Linear Regression and Correlation

Chapter 14: Multiple Regression

Chapter 15: Chi-Square

Plous

Chapter 17: Social Influences

Chapter 18: Group Judgments and Decisions

Five steps to hypothesis testing

Step 1: Identify the research problem (hypothesis)

Describe the null and alternative hypotheses

For correlation null is that r = 0 (no relationship)

Step 2: Decision rule

- Alpha level? (α= .05 or .01)?

- Critical statistic (e.g. critical r) value from table?

Step 3: Calculations

MSBetween

F =

MSWithin

Step 4: Make decision whether or not to reject null hypothesis

If observed r is bigger then critical r then reject null

Step 5: Conclusion - tie findings back in to research problem

Finding a statistically significant correlation

- The result is “statistically significant” if:
- the observed correlation is larger than the critical correlationwe want our r to be big if we want it to be significantly different from zero!! (either negative or positive but just far away from zero)
- the p value is less than 0.05 (which is our alpha)
- we want our “p” to be small!!

- we reject the null hypothesis
- then we have support for our alternative hypothesis

Correlation: Measure of how two variables co-occur and also can be used for prediction

- Range between -1 and +1

- The closer to zero the weaker the relationship and the worse the prediction

- Positive or negative

- Positive correlation:
- as values on one variable go up, so do values for other variable
- pairs of observations tend to occupy similar relative positions
- higher scores on one variable tend to co-occur with higher scores on the second variable
- lower scores on one variable tend to co-occur with lower scores on the second variable
- scatterplot shows clusters of point
- from lower left to upper right

- Negative correlation:
- as values on one variable go up, values for other variable go down
- pairs of observations tend to occupy dissimilar relative positions
- higher scores on one variable tend to co-occur with lower scores on
- the second variable

- lower scores on one variable tend to
- co-occur with higher scores on the
- second variable
- scatterplot shows clusters of point
- from upper left to lower right

- as values on one variable go up, values for the other variable
- go... anywhere

- pairs of observations tend to occupy seemingly random
- relative positions

- scatterplot shows no apparent slope

The more closely the dots approximate a straight line,

the stronger the relationship is.

- Perfect correlation = +1.00 or -1.00

- One variable perfectly predicts the other
- No variability in the scatter plot
- The dots approximate a straight line

Computational formula for correlation - abbreviated by r

Pearson correlation coefficient (r): A number between -1.00

and =1.00 that describes the linear relationship between

pairs of quantitative variables

The formula:

We want to know the relationship between math ability and

spelling ability. We gave 5 people a 20-point math test and a

20-point spelling test.

.

.

.

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

MD 510 50 25100

RG 1 6 6 1 36

Σ 3560 484325800

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

MD 510 50 25100

RG 1 6 6 1 36

Σ3560 484325800

.

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

MD 510 50 25100

RG 1 6 6 1 36

Σ3560 484325800

Step 1: Find n

n = 5 (5 pairs)

Step 2: Find ΣX and ΣY

Step 3: Find ΣXY

Step 4: Find ΣX2 and ΣY2

Step 5: Plug in the numbers

The formula:

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

MD 510 50 25100

RG 1 6 6 1 36

Σ3560 484325800

r =

r =

r =

(320)

[√[(1625)-(1225)]

[√[(4000)-(3600)]

[√[(5)(325)-(35)2]

[√[(5)(800)-(60)2]

320

=

[√400]

[√400]

400

Step 5:

Plug in the

numbers

The formula:

(5)(484)-(35)(60)

(2420)-(2100)

r =

.80

Make decision whether the correlation is different from zero

α= 0.05

df = 3

Observed r(3) = 0.80

Critical r(3) = 0.878

Conclusion:

r = 0.80 is not bigger than a r = .878 so not a significant r (not significantly different than zero – nothing going on)

r(3) = 0.80; n.s.

Observed r(3) = 0.80

r(3) = 0.80; n.s.

Critical r(3) = 0.878

Conclusion:

r = 0.80 is not bigger than a r = .878 so not a significant r (not significantly different than zero – nothing going on)

These data suggest a strong positive correlation between math

ability and spelling ability, however this correlation was not large

enough to reach significance, r(3) = 0.80; n.s.

What if we ran more subjects?

Computational formula for correlation - abbreviated by r

Pearson correlation coefficient (r): A number between -1.00

and =1.00 that describes the linear relationship between

pairs of quantitative variables

The formula:

We want to know the relationship between math ability and

spelling ability. We gave 50 people a 20-point math test and a

20-point spelling test.

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

: : ::::

RG 1 6 6 1 36

Σ350600484032508000

The same data were copied 10 times to highlight power of larger samples

What if we ran more subjects?

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

:: : : : :

RG 1 6 6 1 36

Σ350600484032508000

Step 1: Find n

n = 50 (50 pairs)

Step 2: Find ΣX and ΣY

Step 3: Find ΣXY

Step 4: Find ΣX2 and ΣY2

Step 5: Plug in the numbers

The formula:

Name Math(X) Spelling(Y) XY X2 Y2

KL 1314182169196

GC 918162 81324

JB 712 84 49144

MD :::::

RG 1 6 6 1 36

Σ350600484032508000

r =

[√[(50)(3250)-(350)2]

[√[(50)(8000)-(600)2]

3200

r =

4000

Step 5:

Plug in the

numbers

The formula:

(50)(4840)-(350)(600)

r =

.80

α= 0.05

df = 48

Observed r(48) = 0.80

Critical r(48)= 0.288

r(48) = 0.80; p < 0.05.

What if we had run

more participants??

Conclusion:

r = 0.80 is bigger than a r = .273 so there is a significant r

(yes significantly different than zero – something going on)

Observed r(48) = 0.80

Critical r(48)= 0.273

r(48) = 0.80; p < 0.05.

These data suggest a strong positive correlation between math

ability and spelling ability, and this correlation was large enough

to reach significance, r(48) = 0.80; p < 0.05

Education

Age

IQ

Income

0.38*

Education

-0.02

0.52*

Age

0.38*

-0.02

0.27*

IQ

0.52*

Income

0.27*

Correlation matrix: Table showing correlations for all possible

pairs of variables

1.0**

0.41*

0.65**

0.41*

1.0**

1.0**

0.65**

1.0**

* p < 0.05

** p < 0.01

Education

Age

IQ

Income

Correlation matrix: Table showing correlations for all possible

pairs of variables

Education

Age

IQ

Income

0.41*

0.38*

0.65**

-0.02

0.52*

0.27*

* p < 0.05

** p < 0.01

Finding a statistically significant correlation

- The result is “statistically significant” if:
- the observed correlation is larger than the critical correlationwe want our r to be big if we want it to be significantly different from zero!! (either negative or positive but just far away from zero)
- the p value is less than 0.05 (which is our alpha)
- we want our “p” to be small!!

- we reject the null hypothesis
- then we have support for our alternative hypothesis

- Variable names
- Make up any name that
- means something to you
- VARX = “Variable X”
- VARY = “Variable Y”
- VARZ = “Variable Z”

Correlation of X with X

Correlation of Y with Y

Correlation of Z with Z

Does this correlation reach statistical

significance?

- Variable names
- Make up any name that
- means something to you
- VARX = “Variable X”
- VARY = “Variable Y”
- VARZ = “Variable Z”

Correlation of X with Y

Correlation of X with Y

p value for correlation of X with Y

p value for correlation of

X with Y

Does this correlation reach statistical

significance?

- Variable names
- Make up any name that
- means something to you
- VARX = “Variable X”
- VARY = “Variable Y”
- VARZ = “Variable Z”

Correlation of X with Z

Correlation of X with Z

p value for correlation of

X with Z

p value for correlation of X with Z

Correlation matrices

Does this correlation reach statistical

significance?

- Variable names
- Make up any name that
- means something to you
- VARX = “Variable X”
- VARY = “Variable Y”
- VARZ = “Variable Z”

Correlation of Y with Z

Correlation of Y with Z

p value for correlation of

Y with Z

p value for correlation of

Y with Z

What do we care about?

- When used for prediction we refer to the predicted variable
- as the dependent variable and the predictor variable as the independent variable

What are we predicting?

What are we predicting?

Dependent

Variable

Dependent

Variable

Independent

Variable

Independent

Variable

What are we predicting?

Positive correlation: as values on one variable go up, so do values for the

other variable

Negative correlation: as values on one variable go up, the values for the

other variable go down

Yearly income by expenses per year

YearlyIncome

Positive

Correlation

Expenses per year

What are we predicting?

Positive correlation: as values on one variable go up, so do values for the

other variable

Negative correlation: as values on one variable go up, the values for the

other variable go down

Temperatures by time spent outside

in Tucson in summer

Temperature

Negative

Correlation

Timeoutside

What are we predicting?

Positive correlation: as values on one variable go up, so do values for the

other variable

Negative correlation: as values on one variable go up, the values for the

other variable go down

Height by average driving speed

Height

Zero

Correlation

Average

Speed

What are we predicting?

Positive correlation: as values on one variable go up, so do values for the

other variable

Negative correlation: as values on one variable go up, the values for the

other variable go down

Amount Healthtex spends

per month on advertising

by sales in the month

Amountof sales

Positive

Correlation

Amount spent

On Advertising

YearlyIncome

Expenses per year

If you probably make this much

Y-intercept = “a” (also “b0”)Where the line crosses the Y axis

Slope = “b” (also “b1”)How steep the line is

If you spend this much

- The predicted variable goes on the “Y” axis and is called the dependent variable
- The predictor variable goes on the “X” axis and is called the independent variable

- what is it good for?

Prediction line

- makes the relationship easier to see
- (even if specific observations - dots - are removed)

- identifies the center of the cluster of (paired) observations

- identifies the central tendency of the relationship(kind of like a mean)

- can be used for prediction

- should be drawn to provide a “best fit” for the data

- should be drawn to provide maximum predictive power for the data

- should be drawn to provide minimum predictive error

Yearly Income

Yearly Income

YearlyIncome

Expenses per year

Expenses per year

Expenses per year

Y-intercept = “a”Where the line

crosses the Y axis

Slope = “b” How steep the line is

Y-intercept is good…slope is wrong

Y-intercept is wrong…slope is good

5

4

Number of times per day teeth are brushed

3

2

1

0

0 1 2 3 4 5

Number of cavities

Does brushing your teeth correlate

with fewer cavities?

Step 1: Draw scatterplot

Step 2: Data table

X Y XY X2 Y2

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

Step 3: Estimate r and prediction line

Step 4: Find r

Step 1: Find n

n = 5 (5 pairs)

Step 2: Find ΣX and ΣY

Step 3: Find ΣXY

Step 4: Find ΣX2 and ΣY2

Step 5: Plug in the numbers

X Y XY X2 Y2

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

The formula:

r =

r =

[√[(5)(55)-(15)2]

[√[(5)(48)-(14)2]

- 40

(170 - 210)

=

[√50 ]

[√44 ]

46.90

Step 1: Find n

n = 5 (5 pairs)

Step 2: Find ΣX and ΣY

Step 3: Find ΣXY

Step 4: Find ΣX2 and ΣY2

Step 5: Plug in the numbers

(5)(34)-(14)(15)

X Y XY X2 Y2

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

r = -.85

The formula:

X Y XY X2 Y2.

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

Find r

r = -0.85

X Y XY X2 Y2.

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

Draw a scatterplot

X Y XY X2 Y2

1 5 5 1 25

3 4 12 9 16

2 3 6 4 9

3 2 6 9 4

5 1 5 25 1

Σ 14 15 34 48 55

Draw a scatterplot

Draw a regression line

Draw a regression line

r = -0.85

b= - 0.91(slope)

a= 5.5

(intercept)

Draw a regression line

and regression equation

Prediction line

Y’ = a+ b1X1

Y’ = 842 + (-37.5)X1

Y-intercept

a) Interpret the slope of the fitted regression line:Sales = 842 – 37.5 Price

Slope

Notice in this case it is negative

A slope of “37.5” suggests that raising “price”

by 1 unit will reduce “sales” by 37.5 units

b) If “price” = 20, what is the prediction for “Sales”?Sales = 842 – 37.5 Price

Sales = 842 - 37.5 Price

Sales = 842 - (37.5) (20)

Sales = 842 - (37.5) (20) = 842 – 750 = 92

Sales

price of product

Prediction line

Y’ = a+ b1X1

Y’ = 842 + (-37.5)X1

Interpreting regression equation

Y-intercept

a) Interpret the slope of the fitted regression line:Sales = 842 – 37.5 Price

Slope

A slope of “37.5” suggests that raising “price”

by 1 unit will reduce “sales” by 37.5 units

b) If “price” = 20, what is the prediction for “Sales”?Sales = 842 – 37.5 Price

Sales = 842 - 37.5 Price

Sales = 842 - (37.5) (20)

Sales = 842 - (37.5) (20) = 842 – 750 = 92

(20, 92)

Sales probablyabout 92 units

Sales

price of product

If Price = 20

Prediction line

Y’ = a+ b1X1

Y’ = 2.277 + (.0307)X1

a) The regression equation:

NetIncome = 2,277 + .0307 Revenue

Interpret the slope

Y-intercept

Slope

Notice in this case it is positive

A slope of “.0307” suggests that raising “Revenue”

by 1 dollar, NetIncome will raise by 3 cents

b) If “Revenue” = 1,000, what is the prediction for “NetIncome”?

NetIncome = 2,277 + .0307 Revenue

NetIncome = 2,277 + (.0307 )(1,000)

NetIncome = 2,277 + 30.7 = 2,307.7

(1,000, 2,307.7)

NetIncome

Revenue

Prediction line

Y’ = a+ b1X1

Y’ = 2,277 + (.0307)X1

a) The regression equation:

NetIncome = 2,277 + .0307 Revenue

Interpret the slope

Y-intercept

Slope

A slope of “.0307” suggests that raising “Revenue”

by 1 dollar, NetIncome will raise by 3 cents

b) If “Revenue” = 1,000, what is the prediction for “NetIncome”?

NetIncome will be about 2,307.70

NetIncome = 2,277 + .0307 Revenue

NetIncome = 2,277 + (.0307 )(1,000)

NetIncome = 2,277 + 30.7 = 2,307.7

(1,000, 2,307.7)

NetIncome

Revenue

If Revenue = 1000

Prediction line

Y’ = a+ b1X1

Cost will be about 95.06

Cost

Y-intercept

The expected cost for dinner for two couples (4 people) would be $95.06Cost = 15.22 + 19.96 Persons

People

Slope

If People = 4

If “Persons” = 4, what is the prediction for “Cost”?

Cost = 15.22 + 19.96 Persons

Cost = 15.22 + 19.96 (4)

Cost = 15.22 + 79.84 = 95.06

If “Persons” = 1, what is the prediction for “Cost”?

Cost = 15.22 + 19.96 Persons

Cost = 15.22 + 19.96 (1)

Cost = 15.22 + 19.96 = 35.18

Prediction line

Y’ = a+ b1X1

Rent will be about 990

Cost

Y-intercept

Slope

Square Feet

If SqFt = 800

The expected cost for rent on an 800 square foot apartment is $990Rent = 150 + 1.05 SqFt

If “SqFt” = 800, what is the prediction for “Rent”?

Rent = 150 + 1.05 SqFt

Rent = 150 + 1.05 (800)

Rent = 150 + 840 = 990

If “SqFt” = 2500, what is the prediction for “Rent”?

Rent = 150 + 1.05 SqFt

Rent = 150 + 1.05 (2500)

Rent = 150 + 840 = 2,775

Prediction line

Y’ = a+ b1X1

Frequency of Teeth brushing will be about

Y-intercept

If number of cavities = 3

Slope

The expected frequeny of teeth brushing for having one cavity is

Frequency of teeth brushing= 5.5 + (-.91) Cavities

If “Cavities” = 3, what is the prediction for “Frequency of teeth brushing”?

Frequency of teeth brushing= 5.5 + (-.91) Cavities

Frequency of teeth brushing= 5.5 + (-.91) (3)

Frequency of teeth brushing= 5.5 + (-2.73) = 2.77

(3.0, 2.77)

Draw a regression line

and regression equation

Prediction line

Y’ = b1X1+ b0

Y’ = (-.91)X 1+ 5.5

b0 = 5.5

(intercept)

b1 = - 0.91(slope)

r = - 0.85

Thank you!

See you next time!!