Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

T-Test: Testing Inferences About Population Means

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

t-test

Testing Inferences about Population Means

Learning Objectives

Compute by hand and interpret


Single sample t Independent samples t Dependent samples t

Use SPSS to compute the same tests and interpret the output

Review 6 Steps for Significance Testing


1. 2.

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.

One Sample Exercise (1)


Testing whether light bulbs have a life of 1000 hours
1. 2.

Set alpha. = .05 State hypotheses.


Null hypothesis is H0: = 1000. Alternative hypothesis is H1: 1000.

3.

Calculate the test statistic

Calculating the Single Sample t


800 750 940 970 790 980 820 760 1000 860

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

X 867 1000 tX 4.35 SX 30 .59

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.

Stating the Conclusion

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

Sig. (2-tailed) .002

Mean Difference -133.0000

t-tests with Two Samples


Independent Samples t-test Dependent Samples t-test

Independent Samples t-test

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.

Independent samples t-test


The formula for the standard error of the difference in means: 2 2

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.

Independent Sample Data


(Data are time off task)

Experimental (Caff)
12 14 10 8

Control (No Caffeine)


21 18 14 20

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

Independent Sample Steps(1)


1. 2.

Set alpha. Alpha = .05 State Hypotheses. Null is H0: 1 = 2. Alternative is H1: 1 2.

Independent Sample Steps(2)


3.

Calculate test statistic:

X 1 X 2 9.778 15.1 5.322 t 2.758 SEdiff 1.93 1.93


SEdiff SD SD (4.1164) (4.2805) 1.93 N1 N2 9 10
2 1 2 2 2 2

Independent Sample Steps (3)


4.

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

Independent Samples Exercise


Experimental Control
12 14 20 18

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

Independent Samples Test Levene's Test for Equality of Variances

t-test for Equality of Means 95% Confidence Interval of the Difference Lower Upper -10.7963 -10.7493 -1.2037 -1.2507

F TIME Equal variances assumed Equal variances not assumed .130

Sig. .729

t -2.958 -3.000

df 7 6.857

Sig. (2-tailed) .021 .020

Mean Difference -6.0000 -6.0000

Std. Error Difference 2.0284 2.0000

Dependent Samples t-tests

Dependent Samples t-test

Used when we have dependent samples matched, paired or tied somehow


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

t is the difference in means over a standard error.

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.

Another way to write the formula

tXD

D SDD n pairs

Dependent Samples t example


Person Painfree (time in sec) 60 35 70 50 60 55 13.23 Placebo Difference 1 2 3 4 5 M SD 55 20 60 45 60 48 16.81 5 15 10 5 0 7 5.70

Dependent Samples t Example (2)


1. Set alpha = .05 2. Null hypothesis: H0: 1 = 2.

3. Calculate the test statistic:

Alternative is H1: 1 2.

SEdiff

SD n pairs

5.70 2.55 5

D 55 48 7 t 2.75 SEdiff 2.55 2.55

Dependent Samples t Example (3)


4.

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.

Conclusion. Not (quite) significant. Painfree does not have an effect.

Using SPSS for dependent t-test


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.

Dependent t- SPSS output


Paired Samples Statistics Std. Error Mean 5.9161 7.5166 Pair 1 PAINFREE PLACEBO Mean 55.0000 48.0000 N 5 5 Std. Deviation 13.2288 16.8077

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

Std. Deviation 5.7009

Std. Error Mean 2.5495

t 2.746

df 4

Sig. (2-tailed) .052

You might also like