Sociology 601 Class 7: September 22, 2009

Slides:



Advertisements
Similar presentations
Inferential Statistics
Advertisements

Section 9.3 Inferences About Two Means (Independent)
Statistical Issues in Research Planning and Evaluation
Sociology 601 Class 8: September 24, : Small-sample inference for a proportion 7.1: Large sample comparisons for two independent sample means.
STATISTICAL INFERENCE PART V
 Last time we discussed t-tests: how to use sample means of quantitative variables to make inferences about parameters.  Today we’ll use the very same.
STAT E-102 Midterm Review March 14, 2007.
Copyright ©2011 Brooks/Cole, Cengage Learning More about Inference for Categorical Variables Chapter 15 1.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Lab 4: What is a t-test? Something British mothers use to see if the new girlfriend is significantly better than the old one?
Sociology 601 Class 10: October 1, : Small sample comparisons for two independent groups. o Difference between two small sample means o Difference.
1 Difference Between the Means of Two Populations.
T-tests Computing a t-test  the t statistic  the t distribution Measures of Effect Size  Confidence Intervals  Cohen’s d.
PSY 307 – Statistics for the Behavioral Sciences
The Normal Distribution. n = 20,290  =  = Population.
Sociology 601: Class 5, September 15, 2009
What z-scores represent
Topic 2: Statistical Concepts and Market Returns
Sociology 601: Midterm review, October 15, 2009
Sociology 601 Class12: October 8, 2009 The Chi-Squared Test (8.2) – expected frequencies – calculating Chi-square – finding p When (not) to use Chi-squared.
Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.
T-Tests Lecture: Nov. 6, 2002.
EXPERIMENTAL DESIGN Random assignment Who gets assigned to what? How does it work What are limits to its efficacy?
Independent Sample T-test Often used with experimental designs N subjects are randomly assigned to two groups (Control * Treatment). After treatment, the.
Inferences About Process Quality
Chapter 9 Hypothesis Testing.
Independent Sample T-test Classical design used in psychology/medicine N subjects are randomly assigned to two groups (Control * Treatment). After treatment,
5-3 Inference on the Means of Two Populations, Variances Unknown
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Fall 2012Biostat 5110 (Biostatistics 511) Discussion Section Week 8 C. Jason Liang Medical Biometry I.
AM Recitation 2/10/11.
Statistics 11 Hypothesis Testing Discover the relationships that exist between events/things Accomplished by: Asking questions Getting answers In accord.
Chapter 13 – 1 Chapter 12: Testing Hypotheses Overview Research and null hypotheses One and two-tailed tests Errors Testing the difference between two.
Week 9 Chapter 9 - Hypothesis Testing II: The Two-Sample Case.
1/2555 สมศักดิ์ ศิวดำรงพงศ์
T-distribution & comparison of means Z as test statistic Use a Z-statistic only if you know the population standard deviation (σ). Z-statistic converts.
T-Tests and Chi2 Does your sample data reflect the population from which it is drawn from?
More About Significance Tests
Lecture 3: Review Review of Point and Interval Estimators
STATISTICAL INFERENCE PART VII
Comparing Two Population Means
Chapter 9: Testing Hypotheses
Chapter 8 Introduction to Hypothesis Testing
One Sample Inf-1 If sample came from a normal distribution, t has a t-distribution with n-1 degrees of freedom. 1)Symmetric about 0. 2)Looks like a standard.
Week 111 Power of the t-test - Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 7 representative gardens.
T-TEST Statistics The t test is used to compare to groups to answer the differential research questions. Its values determines the difference by comparing.
Testing means, part II The paired t-test. Outline of lecture Options in statistics –sometimes there is more than one option One-sample t-test: review.
© 2008 McGraw-Hill Higher Education The Statistical Imagination Chapter 10. Hypothesis Testing II: Single-Sample Hypothesis Tests: Establishing the Representativeness.
7. Comparing Two Groups Goal: Use CI and/or significance test to compare means (quantitative variable) proportions (categorical variable) Group 1 Group.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Chapter 8 Parameter Estimates and Hypothesis Testing.
Inferential Statistics. Coin Flip How many heads in a row would it take to convince you the coin is unfair? 1? 10?
© Copyright McGraw-Hill 2004
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Statistical Inference Drawing conclusions (“to infer”) about a population based upon data from a sample. Drawing conclusions (“to infer”) about a population.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
1 Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
MATB344 Applied Statistics I. Experimental Designs for Small Samples II. Statistical Tests of Significance III. Small Sample Test Statistics Chapter 10.
366_7. T-distribution T-test vs. Z-test Z assumes we know, or can calculate the standard error of the distribution of something in a population We never.
STAT E102 Midterm Review March 15, Review Topics Populations, parameters, sampling Types of data i.e., nominal, ordinal, discrete, continuous Graphical/tabular.
1 Pertemuan 09 & 10 Pengujian Hipotesis Mata kuliah : A Statistik Ekonomi Tahun: 2010.
1 Testing Statistical Hypothesis The One Sample t-Test Heibatollah Baghi, and Mastee Badii.
Inference for distributions: - Comparing two means.
Chapter 7 Inference Concerning Populations (Numeric Responses)
4-1 Statistical Inference Statistical inference is to make decisions or draw conclusions about a population using the information contained in a sample.
Chapter 9 Introduction to the t Statistic
04/10/
business analytics II ▌assignment one - solutions autoparts 
Presentation transcript:

Sociology 601 Class 7: September 22, 2009 6.4: Type I and type II errors 6.5: Small-sample inference for a mean 6.6: Small-sample inference for a proportion 6.7: Evaluating p of a type II error.

6.5: A catastrophe of small samples: Historical example: W.S. Gossett, a chemist at Guinness, testing beer quality in 1908. assumptions: random sample, normal distribution, &c. Ho: a given batch of beer has the same characteristics as an overall standard (pH, alcohol content, clarity, &c.) test statistics: mean scores from small samples of measurements from a single batch of beer. p-values: often quite low! a frequent conclusion: the batch of beer has nonstandard characteristics, so we must discard it even if it tastes fine.

6.5: Why the problem with small samples? Within a distribution of samples, the estimated variance and standard deviation will vary, even for samples with the same sample mean. s2 will sometimes be larger than 2 and sometimes smaller. when s is smaller than , a moderate difference between Ybar and μ0 might be statistically significant. when s is larger than , a large difference between Ybar and μ0 might not be statistically significant.

What causes this problem? The problem is that an imprecise estimator of sigma can distort p-values. This problem arises even though the population has a normal distribution, and even though the (imprecise) estimator is unbiased.

Correcting the problem: the t-test. SOLUTION: calculate test statistics as before, but recalculate the table we use to find p-values. the t-score for small samples is calculated in the same way as the z-score for large samples. look up the test statistic in Table B, page 669 degrees of freedom = n-1 conduct hypothesis tests or estimate confidence intervals as with a larger sample.

Properties of the t-distribution: the t-distribution is bell-shaped and symmetric about 0. Compared to a z-distribution, the t-distribution has extra area in the extreme tails. as n-1 increases, the t-distribution becomes indistinguishable from the normal distribution.

Student’s t-distribution t-distribution (df=1) and normal distribution:

Student’s t-distribution

Using table B on page 669: You have a t-score: what is the p-value? t Lower t in Table B Lower p in Table B Higher t in Table B Higher p in Table B P (1-sided) P (2-sided) 2.130 5 16 601

Using table B on page 669: You have a t-score: what is the p-value? t Lower t in Table B Lower p in Table B Higher t in Table B Higher p in Table B P (1-sided) P (2-sided) 2.130 5 1.533 .100 2.132 .050 p<.10 n.s. 16 1.753 2.131 .025 p<.05 601 1.960 2.326 .010 p<.025

Using STATA to find t-scores and p-values t-statistics and p-values using DISPLAY INVTTAIL and DISPLAY TPROB: You provide the df and either the 1-tailed p or the 2-tailed t compare to table B, page 669 examples given for sample sizes 10000 and 5 (df = n – 1) Compare also to invnorm and normprob . display invttail(9999,.025) 1.9602012 . display invttail(4,.025) 2.7764451 . display tprob(9999,1.96) .05002352 . display tprob(4,1.96) .12155464

STATA commands for section 6.5 or 6.2 immediate test for sample mean using TTESTI: (note use of t-score, not z-score) . * for example, in A&F problem 6.8, n=100 Ybar=508 sd=100 and mu0=500 . ttesti 100 508 100 500, level(95) One-sample t test ------------------------------------------------------------------------------ | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- x | 100 508 10 100 488.1578 527.8422 Degrees of freedom: 99 Ho: mean(x) = 500 Ha: mean < 500 Ha: mean != 500 Ha: mean > 500 t = 0.8000 t = 0.8000 t = 0.8000 P < t = 0.7872 P > |t| = 0.4256 P > t = 0.2128

T-test example: small-sample study of Anorexia A study compared various treatments for young girls suffering from anorexia. The variable of interest was the change in weight from the beginning to the end of the study. For a sample of 29 girls receiving a cognitive behavioral treatment, the changes in weight are summarized by Ybar = 3.01 and s = 7.31 pounds “Does the cognitive behavioral treatment work?”

T-test example: small-sample study of Anorexia Assumptions: We are working with a random sample of some sort. Observations are independent of each other. Change in weight is an interval scale variable. Change in weight is distributed normally in the population. Hypothesis: H0: µ = 0. The mean change in weight is zero for the conceptual population of young girls undergoing the anorexia treatment.

T-test example: small-sample study of Anorexia Test statistic: if Ybar =3.01, s = 7.31, and n=29, then Standard error = 7.31/sqrt(29) = 1.357 t = 3.01 / 1.357 = 2.217 P-value: df = 29 – 1 = 28 T(.025, 28df) = 2.048, T(.010, 28df) = 2.467 2.467 > 2.217 > 2.048 .01 < p < .025 P < .025 (one-sided), so P < .05 (two-sided)

T-test example: small-sample study of Anorexia conclusion: reject H0: girls who undergo the cognitive behavioral treatment do not stay the same weight. By this analysis, the results of the study are statistically significant. To conclude that the results are substantively significant, we need to address more questions. Q: Is 3.1 pounds a meaningful increase in weight? Note: s = 7.31. This number has substantive as well as statistical importance. Q: Would we really expect girls to have no change in weight if there was no effect of the program?

confidence interval using a t-test This is a formula for a 95% confidence interval for a two- sided t-test. Anorexia example again: Ybar = 3.01, s=7.31, n=29, df=29-1=28, t(.025,28) = 2.048 c.i. = 3.01 ± 2.048(7.31/SQRT(29)) = 3.01 ± 2.780 c.i. = (0.23, 5.79)

6.6: Small-sample inference for a population proportion: the Binomial Distribution With large samples, we have been treating population proportions as a special case of a population mean, but with slightly different equations. z = ( - o ) /s.e. = ( - o ) / (σ0 / SQRT(N) ) = ( - o ) / ( [ SQRT(o(1- o)) ] / SQRT(N) ) With small samples, however, tests for population means require the specific assumption that the variable has a normal distribution within the population. We need a statistic from which we can draw inferences when np < 10 or n(1-p) < 10.

Definitions for the Binomial Distribution Often, a single ‘random trial’ will have two possible outcomes, “yes” (=1) and “no (=0). Let B be a random variable generated by a yes/no process. Then B has a probability distribution: P(B=1) = p ; P(B=0) = 1-p. a heads on a coin flip: p =.5; a 6 on a die role p: = .167; for left-handed p: = ~.10; For a fixed number of observations N, each observation falls into one of the two categories. A key assumption is that the outcomes of successive observations are independent. coin flips? left-handedness?

Probabilities for the Binomial Distribution If we know the population proportion  and the sample size N, we can calculate the probability of exactly X outcomes for any value of X from 0 to N: where N! = 1*2*…*N example: What is the probability of getting 3 heads (and 1 tail) when flipping a coin four times? example: What is the probability of rolling a die 6 times and getting exactly 1 six? Exactly 2 sixes?

Small sample example for population proportion. Gender and selection of manager trainees: If there is no gender bias in trainee selection and the pool of potential trainees is 50% male and 50% female, what is the possibility of getting only two women in a sample of 10 trainees? Alternately, is there evidence of gender bias in trainee selection?

Hypothesis test for a population proportion. Assumptions: we are estimating a population proportion, and the observations are dichotomous, identical, and independent. Hypothesis: Ho:  = .5, where  is the population proportion of trainees who are women. Test statistics: none: we calculate p-values by hand using an exact application of the binomial distribution. P(0 women) = (10!/0!*10!)*(.5)0*(1-.5)10 = .000977 P(1 woman) = (10!/1!*9!)*(.5)1*(1-.5)9 = .000977 Binomial distribution for n= 10,  =.5: x 0 1 2 3 4 5 6 7 8 9 10 P(x) .001 .010 .044 .117 .205 .246 .205 .117 .044 .010 .001

Hypothesis test for a population proportion. p-value: the p-value is the sum of p(x) for every X at least as unlikely as the x we measure. with 2 women and 8 men, we get … p = .001+.010+.044+.044+.010+.001 = .110 Conclusion: Do not reject Ho: from this sample, we cannot conclude with certainty that women and men do not have an equal chance of being selected into the training program.

STATA command for binomial distributions immediate test for small sample proportion using BITESTI: In a jury of 12 persons, only two are women, even though women constitute 53% of the jury-age population. Is this evidence for systematic selection of men in the jury? bitesti 12 2 .53 N Observed k Expected k Assumed p Observed p ------------------------------------------------------------ 12 2 6.36 0.53000 0.16667 Pr(k >= 2) = 0.998312 (one-sided test) Pr(k <= 2) = 0.011440 (one-sided test) Pr(k <= 2 or k >= 11) = 0.017159 (two-sided test)

immediate test for sample proportion using PRTESTI: Alternative STATA command for testing probabilities: useful for large n immediate test for sample proportion using PRTESTI: . * for proportion: in A&F problem 6.12, n=832 p=.53 and p0=.5 . prtesti 832 .53 .50, level(95) One-sample test of proportion x: Number of obs = 832 ------------------------------------------------------------------------------ Variable | Mean Std. Err. [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .53 .0173032 .4960864 .5639136 Ho: proportion(x) = .5 Ha: x < .5 Ha: x != .5 Ha: x > .5 z = 1.731 z = 1.731 z = 1.731 P < z = 0.9582 P > |z| = 0.0835 P > z = 0.0418

Comparison of a binomial distribution and a normal distribution with a large enough N, a binomial distribution will look like a normal distribution. With small samples, and with very low or high sample proportions, the binomial distribution is not normal enough to allow us to extrapolate from a t-score to a p-value. With the binomial, we do not calculate means and standard deviations: we calculate p directly.

6.7: Common questions related to type II error We seldom ask: “What is the power of this test?” A much more common question: “How big an effect would be needed for this study to reject the null hypothesis?” Rule of thumb answer: If alpha = .05 and desired power = .5, then ybar – mu must be at least 2 standard errors. Another common question: “How big a sample size is needed to achieve a desired level of power?” use the SAMPSI command in STATA

Evaluating the probability of type II error The probability of a β (type II) error is the probability of failing to reject the null hypothesis, if the null is false and should be rejected. A related concept is the power of a test: the probability of correctly rejecting the null hypothesis, if the null is false and should be rejected. If the null is false, then β = 1 – (power) If the null is true, then β and power do not apply.

STATA commands for section 6.7: Sample size estimation for a population mean sampsi 12 13, sd(2.5) power(.5) onesample a(.01) where… 12 is the population mean under the null hypothesis 13 is the sample mean you think you might get sd(2.5) specifies the assumed population standard deviation power(.5) specifies a proposed power of 1 – β = .5 onesample indicates we are trying to find the value for one group, not comparing two groups. a(.01) means alpha = .01, or a .99 confidence interval

STATA commands for section 6.7: Sample size estimation for a population proportion sampsi .5 .53, alpha(.05) power(.5) onesample where… sampsi is the command .5 is the assumed population proportion .53 is the upper bound you would want, based on .5 alpha is the proposed alpha level power is the proposed power, or 1 - β onesample indicates we are trying to find the value for one group, not comparing two groups.

STATA commands for section 6.7: Using the SAMPSI command to estimate power sampsi .5 .53, alpha(.05) n(100) onesample where… sampsi is the command .5 is the assumed population proportion .53 is the upper bound you would want, based on .5 alpha is the proposed alpha level n is the proposed sample size onesample indicates we are trying to find the value for one group, not comparing two groups.