Watts-College / cpp-524-fall-2021

https://watts-college.github.io/cpp-524-fall-2021/
1 stars 0 forks source link

Lab 6 Null Hypothesis #39

Open dholford opened 2 years ago

dholford commented 2 years ago

I keep getting myself turned around on what the null hypothesis would be for TFA vs. Regular teachers. My sense is the null hypothesis would be that there is no difference and the alternate hypothesis is that there is a difference.

Can someone confirm or set me straight?

lecy commented 2 years ago

That’s correct. With one group that has two levels, one level is included as a dummy, one excluded, the implicit test is the reference group (omitted category) versus the dummy variable group.

For example, if male omitted then b0 becomes the mean of male and b0+b1 is the mean of female.

Y(male) = Y(female)    :::    our desired null

We don’t get that directly, but after some manipulation we see:

b0 = b0+b1  —>
0 = b0 - b0+b1  —>
0 = b1

So the default test of b1=0 in this case is equivalent to our desired hypothesis test Y(male) = Y(female) because b1 represents the group difference, i.e. the contrast or t-test, and in some cases also the effect.

The p-value tells us the likelihood the null is correct, so low p-value means b1 ≠ 0, which is the same as saying the group means Y(m) and Y(f) are NOT the same.

A core insight is that we can test Y(male) = Y(female) in two ways:

(1) Separate the data into two groups and perform a t-test. (2) Run Y = b0 + b1(dummy)

Mathematically these will be identical:

Y(m)-Y(f)  =  b1
SE of the t-test will the the same as SE(b1)
p-value will be the same