Here I go through an example from Rosner's Fundamentals of Biostatistics book.

This is a very good reference book.

I quite like it.

However, you don't want to put it in your backpack, because it's pretty heavy.

It's a very thorough book about couple hundred pages,

and weighing over five pounds is my guess.

In one of the examples from this book, they're comparing 8

oral contraceptive users to 21 controls with respect to blood pressure.

For the oral contraceptive users, they got a average systolic blood pressure

of 133 milligrams of mercury, with a standard deviation of 15,

a control blood pressure of 127 with a standard deviation of 18.

Let's go ahead and manually construct the independent group interval once,

just to churn through the calculation.

When you tend to do this on your own you tend to use t.test or

something like that because you have the raw data.

So the pooled standard deviation estimate is going to be

the square root of the pooled variance estimate.

There we need to take 15.34,

the standard deviation from the oral contraceptive users, square it, 18.23.

The standard deviation from the controls and square it.

And take their weighted average, weighted by their sample sizes.

So 7, which is 8 minus 1, and 20, which is 21 minus 1,

from the two sample sizes minus 1.

Then divided by the sum of the sample sizes minus 2.

That gives us a weighted average of the variances,

where the group, the control group with 21,

gets more impact than the oral contraceptive users with 8.

Then I square root the whole things, because I want the standard deviation.

Then my interval is the difference in the means.

And then you always, whenever you're doing an independent group interval,

you always want to kind of mentally think, which one of my su,

which one is the first part of the sub, subtraction.

In this case my oral contraceptive users are the first part,

so I want to just remember that.

Because you don't want to look silly and

suggest the controls have a higher blood pressure than oral

contraceptive users when the empirical averages are exactly the reverse,

just because you reverse the order in which you were subtracting things.

Then I want to add and subtract the relevant t quantile,

27 degrees of freedom, which is 8 plus 21 minus 2.

The pooled standard deviation estimate times 1 over n1 plus 1 over n2,

raised to the one-half power.

I get about negative 10 to 20.

In this case my interval contains 0, so I cannot rule out 0 as the possibility for

the population difference between the two groups.