--------------------------------------------------------------------------------

name: <unnamed>

log: C:\Documents and Settings\Michael Rosenfeld\My Documents\newer web

> pages\soc_meth_proj3\fall_2011_381_logs\class9.log

log type: text

opened on: 25 Oct 2011, 12:42:42

*We start with the unequal variance t-test comparing nurses and sociologists, which resulted in a T-statistic of 1.356 on 6 degrees of freedom. What does this mean?

. display normal(1.356)

.91245042

* If we are going to use the normal approximation (which won't be exact in this case because the P is nonzero and at 6 df the T and Normal distributions are a little different). If we use the normal command, we start out with the cumulative probability up to 1.356. Then we need to subtract this from one to get the tail probability, then multiply by two to get the two-tailed probability.

. display 1-normal(1.356)

.08754958

. display 2*(1-normal(1.356))

.17509917

. display ttail(6,1.356)

.111954

* Stata's ttail command gives the one tail (i.e. density above 1.356) probability, so all we need to do is double it. The only way to know the syntax of the stata commands (vis-ŕ-vis whether they give you cumulative or cumulative tail P) is to look the commands up.

. display 2*ttail(6,1.356)

.22390801

* T probability is higher here, 22% compared to 17.5%

* Now on to the nurses-sociologists comparison with the equal variance test, which has a much more robust df=970, and the T statistic of 0.445.

. display normal(0.445)

.67184012

. display 2*(1-normal(0.445))

.65631975

* Again, we need to transform the normal output in this way to go from cumulative probability to 2 tail probability.

. display 2*ttail(970,.445)

.65641904

* And the two tailed T probability is the same as the normal to 3 digits, because df is large.