Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sample size needed for power of a study

  1. Nov 28, 2004 #1

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I can't remember how to figure out this type of problem. I swear I figured this out once before, but now I am clueless..

    Let's say there's a certain achievement test and you know that 5th graders in general score a mean of 200 on the test. The known standard deviation of the population is 48 on this test.

    You hypothesize that giving a group of 5th graders special instructions before the test (to choose the first answer that comes to mind) will cause them to score higher. The predicted mean is 208 for this group.

    What I want to find now is how many 5th graders I would need in my sample size for the power of the study to be 80%.

    What I have figured so far is that z-score I will need to get on my distribution of means for population 1 (based on the research hypothesis) is -.84.
    The standard deviation on that distribution of means will be 48/ sqrt(N).
    N being the number of kids in my sample. The mean will be 208.
    I know that z = (x-m)sd but I am stuck on how to solve from here.

    I would appreciate any help. Thanks! :smile:
  2. jcsd
  3. Nov 28, 2004 #2
    Actually z = (x-m)/sd and if you are using m=200 you will need to find the z value corresponding to

    Pr(observation < z) = 0.80 - I think that this z value is 0.85 but I haven't checked it too much

    and then your x (observation) would be

    x > m + z*sd

    This will give you 80% confidence if x really is big enough -- you say that you observe an x of 208 -- in that case

    for z*48/sqrt(N) to be less than or equal to 8, sqrt(N) will have to be > 48*0.85/8 = 5.1

    or N > 26.
    Last edited: Nov 28, 2004
  4. Nov 28, 2004 #3

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    doh! sorry - typo! :redface:

    Thanks for your help! I am not familiar with Pr() and "observation" - but I think I see what you're saying.
  5. Nov 28, 2004 #4
  6. Nov 30, 2004 #5
    Minimum sample size 2 x 567 students for sigma/delta=1/6 alpha=0.05, 1-beta=0.8

    None of you state the significance level alpha, which enters quite crucially into the calculation.
    Alpha is the probability to falsely reject your H0 hypothesis (no difference between the groups) in case it is true. This is the "patient's error" because it will lead to the patients/students bearing the side effects of an ineffective intervention.

    Assuming equal variance and normality of the distributions of scores in both groups, specifying the common alpha-level of 0.025 one-sided (or 0.05 two-sided), you will have a significant result, if the difference d between the group means turns out to be d > 1.96 *SigmaD where SigmaD is the standard deviation of d.

    The 1.96 is computed as y=1-alpha/2 (=0.975); x=sqrt(2)*erfinv(2*y-1), (=1.96) where erfinv is the inverse error function.

    This standard deviation is SigmaD=sigma*sqrt(1/Ni+1/Nc) where
    o sigma=48 is the standard deviaion of the scores within each group
    o Nc is the sample size of the "c"ontrol group
    o Ni is the sample size of the "i"ntervention group
    so we need d > 1.96 * sigma*sqrt(1/Ni+1/Nc) in order to reject the H0-Hypothesis of no difference between the groups.
    Up to here, this is independent of the expected group means of 200 and 208.

    In addition, you want to avoid the "manufacturer's error" of failing to reject H0 in case it is false. A commonly accepted risk for this to happen is 20% or beta=0.2. You say you want power 1-beta=0.80 of the expected distribution of d (with mean 8) to lie to the right of the above value of 1.96 * sigma*sqrt(1/Ni+1/Nc)

    This 20% percentile is at Delta - 0.8416 * sigma*sqrt(1/Ni+1/Nc)

    where Delta is the expectation value for d (which is 208-200=8 in this example)
    The number 0.8416 results from y=0.80;x=sqrt(2)*erfinv(2*y-1); which gives x = 0.8416.

    So we have
    1.96 * sigma*sqrt(1/Ni+1/Nc) < Delta - 0.8416 * sigma*sqrt(1/Ni+1/Nc)

    2.8016*sqrt(1/Ni+1/Nc) < Delta / sigma

    1/Ni+1/Nc < (Delta / sigma / 2.8016)^2

    If you choose Ni=Nc=N, you get N > 2*(2.8016*48/8)^2 =566 So you will need N>566 students in each group.

    In case you are not into DIY math, You can get this standard computation ready made at the interactive site:
    (they round differently and get 567 per group BTW)

    In addition, here is the Maple code to compute the standard deviation of the distribution of d for this example:

    P:=proc(x,m,sigma) exp(-(x-m)^2/abs(2*sigma^2))/sqrt(abs(2*sigma^2)*Pi) end proc;
    Pd:=int(P(x,200,48/sqrt(Nc))*P(x+d,208,48/sqrt(Ni)),x=-infinity .. infinity);
    sqrt(int((d-8)^2*Pd,d= - infinity .. infinity));
    Last edited: Nov 30, 2004
  7. Dec 3, 2004 #6

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Holy cow! I didn't think it would be that much of a pain in the butt to calculate. Thank you for the instructions - and for that link.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook