# Thread: Sample size for a paired t-test

1. ## Sample size for a paired t-test

Hello all

I have a simple question. I need to calculate a sample size for a study that will be analyzed with a paired t-test.

One of the input parameters for the calculation, is the standard deviation of the differences. However, I do not know it. What I do know, is the standard deviation of the first group and the standard deviation of the second group.

Each subject will receive two treatments. A continuous measure will be taken after each. I know what is the standard deviation of the measure after the 1st treatment and I know what is the standard deviation of the measure after the 2nd treatment, but the standard deviation of D, I don't know.

SAS proc power allows to enter the standard deviations I do know, but I have no idea how from there they estimate the difference standard deviation. PASS on the other hand (which is a remarkable sample size software) asks directly for the difference standard deviation, which I don't know.

My question is, how do I estimate the difference standard deviation ? Via simulation ?

2. ## Re: Sample size for a paired t-test

I don't know if this is correct but what about using the pooled sd?

3. ## Re: Sample size for a paired t-test

this is probably somehow correct, however I have one slight problem. In order to calculate a pooled variance I need N, which is my unknown parameter in the first place.

oh yeah.

5. ## Re: Sample size for a paired t-test

Could you use a different program? N is calculated based on test, effect size, alpha (usually .05) and power (usually .8). Basically if you know the effect size here you're in good shape. The program I often use is G-power. It's free and easy to use and works great for simpler models. http://www.psycho.uni-duesseldorf.de...n/aap/gpower3/

6. ## Re: Sample size for a paired t-test

I found it:

(sorry about LateX, don't know what's wrong)

I saw it in SAS details manual, however, I still don't know where this formula came from (anyone recognize it ?)

I tried the formula and I have some answers. PASS calculates using a 0 correlation, I tried calculating the standard deviation of differences using the formula with correlation 0, ran it in Gpower you recommended, and got a match.

Then I used correlation 0.3 and 0.5, but in Gpower and SAS, and got a match.

What I am saying is, that all software are working fine, I only wish I knew this formula, could have saved me a long long time.

The nice part, I tried simulating data with means and standard deviations like mine, and got same result like the formula gave...

7. ## Re: Sample size for a paired t-test

It's just using

8. ## The Following User Says Thank You to Dason For This Useful Post:

trinker (10-17-2013)

 Tweet

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts