Independent samples ttests TwoSample tTests 1 Distinguish between
Independent samples t-tests
Two-Sample t-Tests 1. Distinguish between the statistical question underlying CIs, 1 sample hypothesis tests and 2 -sample hypothesis tests. 2. Describe the procedures for conducting independent 2 sample hypothesis tests when σ is known. • calculation of standard error • calculation/interpretation of CI 3. Describe the procedures for conducting independent 2 sample hypothesis tests when σ is unknown. • calculation of pooled estimate of variance • calculation of standard error • calculation/interpretation of CI 4. Compare the results of tests conducted using the small and large-sample methods.
Important Questions Confidence Interval: • What is the range within which we can be (1 - )% sure that falls? 1 -Sample Hypothesis Test: • What is the likelihood that the sample we have collected was drawn from a population with = ___? 2 -Sample Hypothesis Test: • What is the likelihood that two samples we have collected were drawn from populations with the same value for ?
2 Types of 2 -Sample Tests Paired test – two conditions are comprised of the same elements; same observation is measured under different testing conditions. – EX: Independent test – two conditions are comprised of different elements/observations; often called unpaired – EX:
Basics of a two-sample test •
Sampling Distribution of Differences Between Means: The distribution of the differences between means over repeated sampling from the same population H a: 1 - 2 0 Where does the difference we observe between are samples fall if we assume the null is true? 0
Procedure for 2 -sample Hypothesis Testing Step 1: Decide whether to conduct a one or a two-tailed test. We’ll start with two-tailed tests. Steps 2 and 3: Set up your null and alternative hypotheses Ho : 1 - 2 = 0 or 1 = 2 Ha : 1 - 2 0 or 1 2 Step 4: Choose alpha Step 5: Set up a Rejection Region by determining zcrit or tcrit Step 6: Calculate zobs or tobs Step 7: Make a decision regarding the null. Crit Value: Does the observed value of your test statistic fall in the rejection region? P-value: Is our observed probability less than what alpha is set to? Step 8: Interpret what your decision regarding the null means in terms of your original research question.
Do incentives increase innovation? (z-test) The boss of a tech development firm wants to boost creativity among her employees. To examine if incentives will help, she randomly assigns employees (n = 36) to an incentive condition or to a control condition (n = 36). Those in the incentive condition are told that they will be rewarded with a bonus for each new proposal that demonstrates high innovation. The control condition is told nothing. The boss then measures the number of proposals made by each employee that meet her criteria of innovation. Does the boss have sufficient evidence to conclude that incentives increase innovation? α =. 05. Control Mc = 3. 5 proposals σc = 1. 4 Incentives Min = 2. 1 proposals σin = 0. 8 Step 1: Let’s conduct a two-tailed test. Steps 2 and 3: Set up your null and alternative hypotheses Ho: c - in = 0 or c = in Ha: c - in 0 or c in Step 4: α =. 05. Step 5: zcrit = ± 1. 96
Calculating zobs for a two-sample test •
Zobs = Difference between sample means Standard Error Standard error: Average difference between the sample means (M 1 – M 2) relative to the average difference in the underlying populations (μ 1 – μ 2). Need to combine 2 sources of error (σ1 & σ2) into a single measure.
Do incentives increase innovation? Control Incentives Mc = 3. 5 proposals Mc = 2. 1 proposals σin = 1. 4 σin = 0. 8 n = 36 Step 1: Let’s conduct a two-tailed test. Steps 2 and 3: Set up your null and alternative hypotheses Ho: c - in = 0 or c = in Ha: c - in 0 or c in Step 4: α =. 05. Step 5: zcrit = ± 1. 96 Step 6: Calculate zobs SE:
Null hypothesis sampling distribution of differences between means μ 1 -μ 2=0 Zobs=5. 19 -1. 96 +1. 96
Control Mc = 3. 5 proposals σin = 1. 4 Incentives Mc = 2. 1 proposals σin = 0. 8 Zcrit = ± 1. 96 Zobs = 5. 19 Decision: we will reject the null because Zobs falls in the rejection region z = 5. 19, p <. 05 Interpretation: Incentives significantly decreased the average number of innovative proposals made by employees
What does statistical significance mean? ? We expect some amount of error or variability from sample to sample. A hypothesis test evaluates whethere is more variability or error than we would expect. • We reject the null if the observed error is significantly larger than we’d expect by chance. 1 -sample test: • If the difference between M and 0 is significantly larger than we would expect by chance, we conclude that there is a significant difference between and 0. 2 -sample test: • If the difference between M 1 and M 2 is significantly larger than we would expect by chance, we conclude that there is a significant difference between 1 and 2.
Two-Sample Test: Anthropology (z-test) An anthropologist wants to collect data to determine whether the two different cultural groups that occupy an isolated Pacific Island grow to be different heights. The results of his samples of the heights of adult females are as follows. Group A n = 120 M = 62. 7 σ = 2. 5 Group B n = 120 M = 61. 8 σ = 2. 62 Do these samples constitute enough evidence to reject the null hypothesis that the heights of the two groups are the same? Set alpha to. 05.
Group A n = 120 M = 62. 7 σ = 2. 5 Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Group B n = 120 M = 61. 8 σ = 2. 62
When to do a t-test We should use t instead of z if the σ is unknown We also have to use t instead of z if we have small sample sizes – (because the CLT can no longer be applied) When using t: • df = (n-1)+(n-1) =n+n-2 If group n’s are equal SE is calculated the same:
Independent Sample t-test steps Step 1: One- vs. Two-tailed test Step 2: Specify the NULL hypothesis (HO) • 1 = 2 OR 1 - 2 = 0 Step 3: Specify the ALTERNATIVE hypothesis (Ha) • 1 2 OR 1 - 2 0 Step 4: Designate the rejection region by selecting . Step 5: Determine the critical value of your test statistic • df = (n 1+n 2) – 2 Step 6: Calculate the SE and t observed. Step 7: Compare observed value with critical value: • If test statistic falls in RR, we reject the null. • Otherwise, we fail to reject the null. Step 8: Interpret your decision regarding the null in terms of your original research question.
Bruno’s vs. Sibie’s It’s late at night and you have been drinking working HARD! It’s time for a little snack, but you have miles to go before you sleep so you need your pizza delivered FAST. Below are delivery times for recent orders from two local establishments. Do these data provide enough evidence to conclude that one delivers pizza more quickly ( =. 05)? Bruno’s 33 35 32 31 M = 32 29 s = 2. 24 35 38 M = 36 Sibie’s 37 37 33 s = 2. 00
Bruno’s 33 35 32 31 M = 32 • • • 29 s = 2. 24 35 38 M = 36 Sibies 37 37 33 s = 2. 00 Step 1: run a two-tailed test. Step 2: Ho: B= S Step 3: Ha: B S Step 4: α =. 05 Step 5: df = n+n-2= 5+5 -2= 8; tcrit = ± 2. 306
Bruno’s 33 35 32 31 M = 32 29 s = 2. 24 Step 6 a: calculate SE 35 38 M = 36 Sibies 37 37 33 s = 2. 00
Bruno’s 33 35 32 31 M = 32 29 s = 2. 24 Step 6 a: calculate SE 35 38 M = 36 Sibies 37 37 33 s = 2. 00 Step 6 b: calculate t-obs
Bruno’s M = 32 s = 2. 24 • • • M = 36 Sibies s = 2. 00 Step 1: run a two-tailed test. Step 2: Ho: E = p Step 3: Ha: E p Step 4: α =. 05 Step 5: df = n+n-2= 5+5 -2= 8; tcrit = ± 2. 306 Step 6 a: Calculate SE =1. 34 Step 6 b: tobs = -2. 98 Step 7: Decision regarding the null: reject Step 8: Interpretation: after the treatment, individuals in the exercise condition (M = 32, SD = 2. 24) had significantly fewer symptoms than those in the medication condition (M = 36, SD = 2. 00), t(8) = -2. 98, p <. 05
Important Note About SE Calculating SE with this formula only is appropriate if our groups have equal n’s
Important Note About SE Calculating SE with this formula only is appropriate if our groups have equal n’s If sample sizes are unequal we must calculate a pooled variance (Sp 2)
Calculating a Pooled Variance (Sp 2) We have to calculate a weighted average: OR Standard error: Remember SS= sums of squared deviations: (equal to the numerator of the formula for variance)
Bruno’s 33 35 32 31 M = 32 29 s = 2. 24 • Step 6: Calculate S 2 p 35 38 M = 36 Sibies 37 37 33 s = 2. 00
Bruno’s 33 35 32 31 M = 32 (x) = 160 29 35 38 s = 2. 24 M = 36 (x 2) = 5140 (x) = 180 • Step 6: Calculate S 2 p (x 1) = 160 (x 12) = 5140 Sibies 37 37 (x 2) = 180 (x 22) = 6496 33 s = 2. 00 (x 2) = 6496
Bruno’s 33 35 32 31 M = 32 (x) = 160 29 35 38 Sibies 37 37 s = 2. 24 M = 36 (x 2) = 5140 (x) = 180 33 s = 2. 00 (x 2) = 6496 • S 2 p = 4. 5 • Step 6 a: Calculate SE (same for both methods)
Bruno’s 33 35 32 31 M = 32 (x) = 160 29 35 38 Sibies 37 37 s = 2. 24 M = 36 (x 2) = 5140 (x) = 180 Step 7: Calculate tobs Step 8: Decision Regarding the null Step 9: Interpretation 33 s = 2. 00 (x 2) = 6496
Advil I am of the opinion that Advil doesn't really work. I feel like, eventually, my headache goes away whether or not I take Advil. So, for the past few months, I have been measuring how long it takes for my headache to go away when I use Advil compared to when I do not. On average, the 15 headaches for which I used Advil went away in 19 minutes (SD = 6), and the 11 headaches for which I did not use Advil went away in 23 minutes (SD = 8). Do these data constitute enough evidence to conclude that Advil is effective in treating headaches ( =. 01)?
- Slides: 32