26
HS AP Stat # 1 TROUBLESOME CONCEPTS IN STATISTICS: r r 2 AND POWER POWER N. Scott Urquhart Director, STARMAP Department of Statistics Colorado State University Fort Collins, CO 80523-1877

TROUBLESOME CONCEPTS IN STATISTICS: r 2 AND POWER

  • Upload
    mala

  • View
    21

  • Download
    2

Embed Size (px)

DESCRIPTION

TROUBLESOME CONCEPTS IN STATISTICS: r 2 AND POWER. N. Scott Urquhart Director, STARMAP Department of Statistics Colorado State University Fort Collins, CO 80523-1877. This research is funded by U.S.EPA – Science To Achieve Results (STAR) Program Cooperative Agreement. # CR - 829095. - PowerPoint PPT Presentation

Citation preview

Page 1: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 1

TROUBLESOME CONCEPTS IN STATISTICS:

rr22 AND POWERPOWER

N. Scott UrquhartDirector, STARMAP

Department of StatisticsColorado State University

Fort Collins, CO 80523-1877

Page 2: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 2

STARMAP FUNDINGSpace-Time Aquatic Resources Modeling and Analysis Program

The work reported here today was developed under the STAR Research Assistance Agreement CR-829095 awarded by the U.S. Environmental Protection Agency (EPA) to Colorado State University. This presentation has not been formally reviewed by EPA.  The views expressed here are solely those of the presenter and STARMAP, the Program he represents. EPA does not endorse any products or commercial services mentioned in these presentation.

This research is funded by

U.S.EPA – Science To AchieveResults (STAR) ProgramCooperativeAgreement

# CR - 829095

Page 3: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 3

INTENT FOR TODAY

To discuss two topics which have givensome of you a bit of confusion

r2 in regression Power in the context of tests of hypotheses Thanks for Ann Brock and Harriett Bassett

for suggesting these topics Approach: Visually illustrate the idea,

Then talk about the concepts illustrated The sequences of graphs are available on the

internet right now (address is at the end of

this handout) Questions are welcome

Page 4: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 4

r2 IN REGRESSION

r2 provides a summary of the strength of a (linear) regression which reflects: The relative size of the residual variability, The slope of the fitted line, and How good the observed values of the

predictor variable are for prediction Mainly the range of the Xs

Let’s seesee these features in action, then Look at the formulas

Page 5: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 5

WHAT MAKES r2 TICK?

r2 increases as residual variation decreases

r2 increases as the slope increases

r2 increases the range of x increases

varying one thing, leaving the remaining things fixed

Page 6: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 6

WHAT IS r2?

r2 provides AA measure of the fit of a line to a set of data which incorporates The amount of residual variation, The strength of the line (slope), and How good the set of values of “x” are for

estimating the line Some areas of endeavor tend to

overuse it!

Page 7: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 7

HOW DOES r2 TELL US ABOUT VARIATION?

The following graph illustrates this: The data scatter has r2 = 0.5 (approximately) The red points have the same values, but all

concentrated at X = 5. {Strictly speaking the above formulas

applyonly in the case of bivariate

regression.} {Estimation formulas involve factors

of n-1 and n-2.}

2

2 21

var( )

var( | ) ( )

Y

Y X

Page 8: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 8

r2

Page 9: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 9

FORMULAS FOR r2

But these have little intuitive appeal ! We’ll decompose observations into

parts: Mean Regression Residual

22

2 2

22

2 2 2 2

is estimated by

,

,

cov ( , )var( )var( )

( )( )

( ) ( )

X Y

X Y

X Y

X Y

X YX Y

x x y ysr

s s x x y y

Page 10: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 10

DECOMPOSING REGRESSION

This is really n equations

Square each of these equations and add them up across i.

The three cross product terms will eachadd to zero. (Try it!)

1 2ˆ ˆ( ) ( ), , , ,i i i i iy y y y y y i n

Page 11: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 11

DECOMPOSING REGRESSION(continued)

SSMean SSReg SSRes

2 2 2 2ˆ ˆ( ) ( )i i iy ny y y y y

2

Proportion of variation "due" to regression

SSRegSSReg SSRes

r

Sum of Squares f or Mean

+ Sum of Squares Regression

+ Sum of Squares of Residuals

Page 12: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 12

POWER OF A TEST OF HYPOTHESIS

Power = Prob(“Being right”) = Prob(Rejecting false hypothesis)

Power depends on two main things The difference in the hypothesized and true

situations, and The strength of the information for making

the test Sample size is very important factor In regression it depends on the same factors as

the ones which increase r2. Again, see it, then talk about it

Power increases as = 1 - 2 increases

Page 13: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 13

POWER VARIES WITH DIFFERENCE ( = 1 - 2) and SAMPLE SIZE (n)

Page 14: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 14

ON TESTS OF HYPOTHESES( ON THE WAY TO POWER)

ACTION

TRUE SITUATION

FAIL TO REJECT THE NULL

HYPOTHESIS

REJECT THE NULL

HYPOTHESIS

CORRECT ACTION

CORRECT ACTION

HYPOTHESIS TRUE

HYPOTHESIS FALSE

TYPE II ERROR

TYPE I ERROR

Tests of hypotheses are designed to control = Prob (Type I Error)

While getting Power = 1- Prob (Type II Error) as large as

possible

Page 15: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 15

ON TESTS OF HYPOTHESES(AN ASIDE)

Which is worse, a type I error, or a type II error?

It depends tremendously on perspective Consider the criminal justice system

Truth: Accused is innocent (HO) or guilty (HA) Action: Accused is acquitted or convicted

Type I error = Convict an innocent person Type II error = Acquit a guilty person

Which is worse? Consider the difference in view of the

Accused Society – especially if accused is terrorist

Page 16: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 16

COMPUTING THE CRITICAL REGION

Consider a simple case X ~ N( , 1) HO: = 4 versus

HA: 4 Critical Region (CR) is

X l and X u , so 0.025 = P(X l )

= P((X-4)/1 ( l - 4)/1) = P(Z -1.96)

l = 2.04, similarly, u = 5.96

Page 17: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 17

COMPUTING POWER

Consider a simple case X ~ N( , 1) HO: = 4 versus

HA: 4 Power (at 5) = ?

= Prob(XA in CR| 5)

XA ~ N( 5, 1)

Prob(XA 2.04) + Prob(XA 5.96)

= Prob(Z -2.96) + Prob(Z 0.96)

= 0.0015 + 0.1685 = 0.1700

Page 18: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 18

POWER VARIES WITH DIFFERENCE ( = 1 - 2) and SAMPLE SIZE (n)

Page 19: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 19

COMPUTING POWER USING A MEAN BASED ON n = 2 OBSERVATIONS

Consider a simple case: When

the mean of two observations follows: HO: = 4 versus HA: 4 Power (at 5) = ?

Critical Region (CR) is l and u , so 0.025 = P( l ) = P(( -4)/0.707 ( l -

4)/0.707) = P(Z -1.96)

So l = 4 – (1.96)(0.707) = 2.61, similarly, u = 5.39

1~ ( , ),X N

2 1 2~ ( , / )X N

2X 2X

2X 2X

Page 20: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 20

COMPUTING POWER USING A MEAN BASED ON n = 2 OBSERVATIONS

(continued)

2 5 2 61 53 38 0 55

0 707 0 707 Prob Prob

.. ( . )

. .AX

Z Z

2 5 1 2Because ~ ( , / ),AX N

0 0004 0 2912 0 2916 0 2930 , a bit more accurately. . . ( . )

2 2 22 61 5 39Power = Prob Prob + Prob( ) ( . ) ( . )A A AX CR X X

Page 21: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 21

POWER VARIES WITH DIFFERENCE ( = 1 - 2) and SAMPLE SIZE (n)

Page 22: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 22

COMPUTING POWER USING A MEAN BASED ON n = 4 OBSERVATIONS

(continued)

4 5 1 4Because ~ ( , / ),AX N

4 4 43 02 4 98Power = Prob Prob + Prob ( ) ( . ) ( . )A A AX CR X X

4 5 3 02 53 96 0 04

0 5 0 5 Prob Prob

.. ( . )

. .AX

Z Z

(This page is not in the handout – so it all would fit on one page)

0 0000 0 5160 0 5160 . . .

Page 23: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 23

POWER VARIES WITH DIFFERENCE ( = 1 - 2) and SAMPLE SIZE (n)

Page 24: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 24

POWER VARIES WITH DIFFERENCE ( = 1 - 2) and SAMPLE SIZE (n)

Page 25: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 25

DIRECTIONAL NOTE

As the alternative has been two-sided throughout this presentation, the power curves are symmetric about the vertical axis. By examining only the positive side, we

can see the curves twice as large.

Page 26: TROUBLESOME CONCEPTS IN STATISTICS:   r 2  AND  POWER

HS AP Stat # 26

YOU HAVE ACCESS TO THESEPRESENTATIONS

You can find each of the slide shows shownhere today at:

http://www.stat.colostate.edu/starmap/learning.html

Each show begins with authorship & funding slides You are welcome to use them, and adapt them But, please always acknowledge source and funding You are free to reorder the graphs if it makes

more sense for r2 to decrease than increase.

Urquhart is available to talk to AP Stat classesabout statistics as a profession.

See content on the web site above.