week05-1a

week05-1a - TA session 5 Econ. 103, winter 2010 Wed., Feb....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TA session 5 Econ. 103, winter 2010 Wed., Feb. 3, 2010, 10:00 a.m. and 1:00 p.m. in PP2400E. 1 Verbose implementation of HW2 Q5 1.1 Summary stats for Californians count if ca==1 gives the count of those who say they are Californians: 99 sum colgpa if ca==1 gives the summary stats requested. You should see: Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- colgpa | 95 3.528547 .2569961 2.8 3.94 Why are there 95 observations of colgpa for Californians but a total of 99 who say they are from California? It is because some people did not report their GPA. Try typing count if ca==1 & colgpa==. The ampersand & is used to express the logical and when you give Stata logical con- ditions for the execution of some command. For example, try sum age if colgpa>=3.5 & ca==1 . 1.2 Summary stats for out-of-staters count if ca==0 gives the count of those who say they arent Californians: 27 sum colgpa if ca==0 gives the summary stats requested. You should see: Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- colgpa | 27 3.612481 .2987732 3 4 1.3 Confidence interval for the difference of the two populations expected college GPA Recall a confidence interval is constructed from estimates of the mean and standard deviation. A critical value c for the confidence interval is chosen as a function of the level of significance . The confidence interval is wider for big c and smaller for small c . Its formula is bracketleftbigg - c n , + c n bracketrightbigg I gave you a table in notes 4-3 to help you decide from which distribution we select the critical value. In practice, since the sample size is almost always n 30, we draw it from the normal. And you do not have to think about this anyway since Stata does it for you. 1 ttest colgpa, by(ca) level(90) this conducts a t-test and, along the way, it also gives you p-values and forms the confidence interval. All in all, a useful command: Two-sample t test with equal variances------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [90% Conf. Interval]---------+--------------------------------------------------------------------...
View Full Document

Page1 / 5

week05-1a - TA session 5 Econ. 103, winter 2010 Wed., Feb....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online