Inference for Distributions Inference for the Mean of a Population Section 7.1
Statistical inference in practice Emphasis turns from statistical reasoning to statistical practice: Population standard deviation, σ, unknown. Inference on µ and comparisons of µ between populations
Example: Cola sweetness Does storage reduce the sweetness of cola? The loss in sweetness after storage is measured by a random sample of n = 10 professional tasters. 2.0 0.4 0.7 2.0-0.4 2.2-1.3 1.2 1.1 2.3 Want to test H 0 : µ = 0 versus H a : µ > 0 Use of the one-sample z test requires knowledge of σ We have the estimate s = 1.196 of σ, but this introduces additional random variability Can t ignore since n is small.
The t distributions Assume a SRS from a N(µ, σ) population. The t statistic has a t distribution with n 1 degrees of freedom The statistic SE = s/ n is the standard error of SE = s/ n estimates In general, t(k) denotes a t distribution with k degrees of freedom
Comparison of t(k) with N(0, 1) A t(k) density curve resembles that of a standard Normal Similarities: Both are centered at zero, symmetric, mound-shaped Differences: t(k) has an additional parameter, k = deg. of freedom The sampling distribution of t statistic depends on sample size t(k) has larger spread, but close match for large k If T is t(k) then σ T > 1, but σ T 1 if k is large Larger spread reflects additional variability due to SE = s/ n
Calculating t probabilities and critical values Suppose T is t(k). In Excel: For c > 0, tdist(c, k, 1) = P(T c) For c > 0, tdist(c, k, 2) = 2P(T c) For 0 < α < 1, tinv(α, k) is the c for which P(T c) = α/2
One-sample t test Assumptions: SRS of size n from a Normal population Hypotheses: H 0 : µ = µ 0 versus a one- or two-sided H a Test statistic: P-value: P(T -t) for H a : µ < µ 0 P(T t) for H a : µ > µ 0 2P(T t ) for H a : µ µ 0 where T is t(n 1)
Example: Cola sweetness (continued) Data: SRS of size n = 10 from a Normal population of professional tasters. Hypotheses: H 0 : µ = 0 versus H a : µ > 0 Summary statistics: and s = 1.196 Test statistic: P-value: P(T 2.70) = 0.012, with k = n 1 = 9 d.f. Decision: Reject H 0 at significance level α = 0.05, and conclude a loss of sweetness
Confidence intervals in testing When H 0 is rejected, a natural follow-up question is: how large is the effect that has been detected? Example: Cola sweetness (continued) H 0 is rejected with α = 0.05, indicating evidence of a loss of sweetness How much sweetness is lost? Answer with a confidence interval
One-sample t confidence interval Assumptions: SRS of size n from a Normal population Target parameter: µ CI formula: For confidence level C, the interval is where t* is such that P(T t*) = (1 C)/2, with T being t(n 1)
Example: Cola sweetness (continued) How much sweetness is lost? 95% CI: To find t* when k = n 1 = 9 d.f., we use Excel. t* = tinv(0.05,9) = 2.26. The interval is Conclude a loss of sweetness between 0.16 and 1.88 units, on average
Robustness With larger samples, one-sample t procedures become robust against violations of the Normality assumption Some guidelines: If n < 15, the Normality assumption is critical If n 15, proceed only in absence of outliers and strong skewness If n 40, the procedures are generally robust
Example: Cola sweetness (continued) Normality may be hard to verify when n is small. Often Normality is argued from one s understanding of the phenomenon under study
Matched pairs experiments The cola sweetness study is an example of a matched -pairs experiment: The raw measurements came in pairs (x 1, x 2 ) x 1 = sweetness before storage x 2 = sweetness after storage But we analyzed the differences within pairs x = x 1 x 2
Comments on matched pairs Common matched pairs settings: Response before and after exposure to a stimulus. Pairs of very similar subjects (i.e., identical twins) applied different treatments When treatments are randomized, matched pairs is a randomized, comparative experiment
Inference for Distributions Comparing Two Means Section 7.2
The two-sample setup Objective: compare two distinct populations through random samples drawn respectively from them Population 1 Population 2 Sample 1 Sample 2 May represent distinct treatments of a randomized comparative experiment. Samples are assumed to be drawn independently of each other
Notation Population 1 Population µ 1 µ 2 σ 1 σ 2 Independence n 1 n 2 s 1 s 2
Basic approach to inference Objective: Calculate a confidence interval for µ 1 µ 2 or test H 0 : µ 1 = µ 2 Starting point: Estimate µ 1 µ 2 with Unbiased for µ 1 µ 2 If both populations are Normal then The z-score of is
The two-sample t statistic Two-sample t procedures are based on the two-sample t statistic z-score with estimated σ 1 and σ 2 If both populations are Normal then t is approximately t(k) with two possible d.f. formulas Satterthwaite s formula: k = smaller of n 1 1 and n 2 1 Easier computation Yields conservative confidence and significance levels
Two-sample t test Assumptions: independent SRSs drawn from distinct Normal populations Hypotheses: H 0 : µ 1 = µ 2 versus a one- or two-sided H a Test statistic: P-value: P(T -t) for H a : µ 1 < µ 2 P(T t) for H a : µ 1 > µ 2 2P(T t ) for H a : µ 1 µ 2 where T is t(k) with k as above
Example: Directed reading Do directed reading activities improve reading ability? Measure degree of reading power (DRP) in: treatment n 1 = 21 third-graders under directed reading n 2 = 23 third-graders under conventional reading Want to test H 0 : µ 1 = µ 2 versus H a : µ 1 > µ 2 control
Example: Directed reading (continued) Data: Independent SRS of sizes n 1 = 21 and n 2 = 23 from Normal populations students DRP measurements Hypotheses: H 0 : µ 1 = µ 2 versus H a : µ 1 > µ 2 Summary statistics: Test statistic:
Example: Directed reading (continued) Test statistic: t = 2.31 P-value*: P(T 2.31) = 0.016, with k = smaller of n 1 1 and n 2 1 = 21 1 = 20 d.f. Decision: Reject H 0 at significance level α = 0.05, and conclude that directed reading activities improve reading ability Next question: How much improvement? * Satterthwaite s formula yields k = 37.9, hence the P-value P(T 2.31) = 0.013
Two-sample t confidence interval Assumptions: independent SRSs drawn from distinct Normal populations Target parameter: µ 1 µ 2 CI formula: For confidence level C, the interval is where t* is such that P(T t*) = (1 C)/2, with T being t(k) and k as above
Example: Directed reading (continued) How much improvement? 95% CI*: Since k = smaller of n 1 1 and n 2 1 = 21 1 = 20 d.f. t* = tinv(0.05,20) = 2.09. The interval is Conclude an improvement between 0.97 and 18.95 units of DRP, on average * Satterthwaite s formula yields the 95% CI (1.23, 18.69)
Robustness The sum of sample sizes provides robustness guidelines on the use of two-sample t procedures: If n 1 + n 2 < 15, the Normality assumption is critical If n 1 + n 2 15, proceed only in absence of outliers and strong skewness If n 1 + n 2 40, the procedures are generally robust Enhance robustness by planning n 1 n 2