T-Test: Testing Inferences About Population Means
T-Test: Testing Inferences About Population Means
T-Test: Testing Inferences About Population Means
Learning Objectives
Use SPSS to compute the same tests and interpret the output
3.
Set alpha (p level). State hypotheses, Null and Alternative. Calculate the test statistic (sample value).
4.
5. 6.
Find the critical value of the statistic. State the decision rule. State the conclusion.
3.
What is the mean of our sample? X = 867 What is the standard deviation for our sample of light bulbs? SD= 96.73
SD 96 .73 SE 30 .59 N 10
Determining Significance
4.
5.
Determine the critical value. Look up in the table (Heiman, p. 708). Looking for alpha = .05, two tails with df = 10-1 = 9. Table says 2.262. State decision rule. If absolute value of sample is greater than critical value, reject null. If |-4.35| > |2.262|, reject H0.
6. State the conclusion. We reject the null hypothesis that the bulbs were drawn from a population in which the average life is 1000 hrs. The difference between our sample mean (867) and the mean of the population (1000) is SO different that it is unlikely that our sample could have been drawn from a population with an average life of 1000 hours.
SPSS Results
One-Sample Statistics Std. Error Mean 30.5887 N BULBLIFE 10 Mean 867.0000 Std. Deviation 96.7299
One-Sample Test Test Value = 1000 95% Confidence Interval of the Difference Lower Upper -202.1964 -63.8036
BULBLIFE
Computers print p values rather than critical values. If p (Sig.) is less than .05, its significant.
t -4.348
df 9
Used when we have two independent samples, e.g., treatment and control groups. X1 X 2 t X1 X 2 Formula is: SEdiff Terms in the numerator are the sample means. Term in the denominator is the standard error of the difference between means.
SEdiff
SD1 SD2 N1 N2
Suppose we study the effect of caffeine on a motor test where the task is to keep a the mouse centered on a moving dot. Everyone gets a drink; half get caffeine, half get placebo; nobody knows who got what.
Experimental (Caff)
12 14 10 8
16 5 3 9
11 N1=9, M1=9.778, SD1=4.1164
11 19 8 12
13 15 N2=10, M2=15.1, SD2=4.2805
Set alpha. Alpha = .05 State Hypotheses. Null is H0: 1 = 2. Alternative is H1: 1 2.
5. 6.
Determine the critical value. Alpha is .05, 2 tails, and df = N1+N2-2 or 10+92 = 17. The value is 2.11. State decision rule. If |-2.758| > 2.11, then reject the null. Conclusion: Reject the null. the population means are different. Caffeine has an effect on the motor pursuit task.
Using SPSS
Open SPSS Open file SPSS Examples for Lab 5 Go to: Analyze then Compare Means Choose Independent samples t-test Put IV in grouping variable and DV in test variable box. Define grouping variable numbers. E.g., we labeled the experimental group as 1 in our data set and the control group as 2
10 8 16
14 20
Work this problem by hand and with SPSS. You will have to enter the data into SPSS.
SPSS Results
Group Statistics Std. Error Mean 1.4142 1.4142 GROUP experimental group control group N 5 4 Mean 12.0000 18.0000 Std. Deviation 3.1623 2.8284
TIME
t-test for Equality of Means 95% Confidence Interval of the Difference Lower Upper -10.7963 -10.7493 -1.2037 -1.2507
Sig. .729
t -2.958 -3.000
df 7 6.857
Repeated measures Brother & sister, husband & wife Left hand, right hand, etc.
Useful to control individual differences. Can result in more powerful test than independent samples t-test.
Dependent Samples t
Formulas:
tXD
D SEdiff
SEdiff
SDD n pairs
The standard error is found by finding the difference between each pair of observations. The standard deviation of these difference is SDD. Divide SDD by sqrt(number of pairs) to get SEdiff.
tXD
D SDD n pairs
Alternative is H1: 1 2.
SEdiff
SD n pairs
5.70 2.55 5
Determine the critical value of t. Alpha =.05, tails=2 df = N(pairs)-1 =5-1=4. Critical value is 2.776
Decision rule: is absolute value of sample value larger than critical value?
5.
6.
Open SPSS Open file SPSS Examples (same as before) Go to: Analyze then Compare Means Choose Paired samples t-test Choose the two IV conditions you are comparing. Put in paired variables box.
Paired Samples Correlations N Pair 1 PAINFREE & PLACEBO 5 Correlation .956 Sig. .011
Paired Samples Test Paired Differences 95% Confidence Interval of the Difference Lower Upper -7.86E-02 14.0786
Pair 1
PAINFREE - PLACEBO
Mean 7.0000
t 2.746
df 4