11_Power

download 11_Power

of 12

Transcript of 11_Power

  • 8/10/2019 11_Power

    1/12

  • 8/10/2019 11_Power

    2/12

    Power is the probability of rejecting the null hypothesis when it is false

    Ergo, power (as its name would suggest) is a good thing; you want more power

    A type II error (a bad thing, as its name would suggest) is failing to reject the null hypothesiswhen it's false; the probability of a type II error is usually called

    Note Power

  • 8/10/2019 11_Power

    3/12

    Consider our previous example involving RDI

    versus

    Then power is

    Note that this is a function that depends on the specific value of !

    Notice as approaches the power approaches

  • 8/10/2019 11_Power

    4/12

    We reject if

    Under

    Under

    So we want

    Equivalently if-

    al pha = 0. 05

    z = qnorm( 1 - al pha)pnor m( mu0 + z * si gma/ sqr t ( n) , mean = mua, sd = si gma/ sqr t ( n) , l ower . t ai l = FALSE)

  • 8/10/2019 11_Power

    5/12

    , , ,

    mu0 = 30mua = 32

    si gma = 4n = 16z = qnorm( 1 - al pha)pnor m( mu0 + z * si gma/ sqr t ( n) , mean = mu0, sd = si gma/ sqr t ( n) , l ower . t ai l = FALSE)

    ## [ 1] 0. 05

    pnor m( mu0 + z * si gma/ sqr t ( n) , mean = mua, sd = si gma/ sqr t ( n) , l ower . t ai l = FALSE)

    ## [ 1] 0. 6388

  • 8/10/2019 11_Power

    6/12

  • 8/10/2019 11_Power

    7/12

    l i brary ( mani pul at e)mu0 = 30mypl ot

  • 8/10/2019 11_Power

    8/12

    When testing , notice if power is , then

    where

    Unknowns: , , ,

    Knowns: ,

    Specify any 3 of the unknowns and you can solve for the remainder

  • 8/10/2019 11_Power

    9/12

    The calculation for is similar

    For calculate the one sided power using (this is only approximately right, itexcludes the probability of getting a large TS in the opposite direction of the truth)

    Power goes up as gets larger

    Power of a one sided test is greater than the power of the associated two sided test

    Power goes up as gets further away from

    Power goes up as goes up

    Power doesn't need , and , instead only

    The quantity is called the effect size, the difference in the means in standard deviation

    units.

    Being unit free, it has some hope of interpretability across settings

    -

    -

  • 8/10/2019 11_Power

    10/12

    Consider calculating power for a Gossett's test for our example

    The power is

    Calcuting this requires the non-central t distribution.

    power . t . t est does this very well

    Omit one of the arguments and it solves for it-

  • 8/10/2019 11_Power

    11/12

    power . t . t est ( n = 16 , del t a = 2/ 4, sd = 1, t ype = "one. sampl e" , al t = "one. si ded" ) $power

    ## [ 1] 0. 604

    power . t . t est ( n = 16 , del t a = 2, sd = 4, t ype = "one. sampl e" , al t = "one. si ded" ) $power

    ## [ 1] 0. 604

    power . t . t est ( n = 16 , del t a = 100 , sd = 200 , t ype = "one. sampl e" , al t = "one. si ded" ) $power

    ## [ 1] 0. 604

  • 8/10/2019 11_Power

    12/12

    power . t . t est ( power = 0. 8 , del t a = 2/ 4, sd = 1, t ype = "one. sampl e" , al t = "one. si ded" ) $n

    ## [ 1] 26. 14

    power . t . t est ( power = 0. 8 , del t a = 2, sd = 4, t ype = "one. sampl e" , al t = "one. si ded" ) $n

    ## [ 1] 26. 14

    power . t . t est ( power = 0. 8 , del t a = 100 , sd = 200 , t ype = "one. sampl e" , al t = "one. si ded" ) $n

    ## [ 1] 26. 14