02a One Sample T-Test

59
1 The One-Sample t -Test Advanced Research Methods in Psychology - lecture - Matthew Rockloff 

Transcript of 02a One Sample T-Test

Page 1: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 1/59

1

The One-Sample t-TestAdvanced Research Methods in Psychology

- lecture -

Matthew Rockloff 

Page 2: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 2/59

2

A brief history of the t-test Just past the turn of the nineteenth century, a

major development in science was fermenting

at Guinness Brewery.

William Gosset, a brewmaster, had invented a

new method for determining how large a

sample of persons should be used in the

taste-testing of beer. The result of this finding revolutionized

science, and – presumably - beer.

Page 3: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 3/59

3

In 1908 Gosset published his

findings in the journal Biometrika

under the pseudonym „student.‟This is why the t-

test is often called

the „student‟s t.‟ 

A brief history of the t-test(cont.)

Page 4: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 4/59

4

A brief history of the t-test(cont.)

Folklore: Two stories circulate for the reason whyGosset failed to use his own name.

1: Guinness may have wanted to keep their 

use of the „t-test‟ secret. By keeping Gossetout of the limelight, they could also protecttheir secret process from rival brewers.

2: Gosset was embarrassed to have his name

associated with either: a) the liquor industry,or b) mathematics.

But seriously, how could that be?

Page 5: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 5/59

5

 Thus ???“Beer is the cause of – 

and solution to – 

all of life's problems.” (Homer Simpson)

Page 6: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 6/59

6

When to use the one-sample t-test One of the most difficult aspects of 

statistics is determining which procedure to

use in what situation.

Mostly this is a matter of practice.

There are many different rules of thumb

which may be of some help.

In practice, however, the more youunderstand the meaning behind each of the

techniques, the more the choice will become

obvious.

Page 7: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 7/59

7

Example problem 2.1 Example illustrates the calculation of 

the one-sample t-test. 

This test is used to compare a list of values to a set standard.

What is this standard?

The standard is any number we choose. As illustrated next, the standard is

usually chosen for its theoretical or 

practical importance.

Page 8: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 8/59

8

Example 2.1 (cont.)

Intelligence tests are constructed such that

the average score among adults is 100

points.

In this example, we take a small sample of 

undergraduate students at Thorndike

University (N = 6), and try to determine if the

average of intelligence scores for allstudents at the university is higher than 100.

In simple terms, are the university

students smarter than average?

Page 9: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 9/59

9

Example 2.1 (cont.)

The scores obtained from the 6 studentswere as follows:

XPerson 1: 110Person 2: 118

Person 3: 110

Person 4: 122Person 5: 110

Person 6: 150

Page 10: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 10/59

10

Example 2.1 (cont.)

Research Question 

On average, do the population of 

undergraduates at Thorndike

University have higher than averageintelligence scores (IQ  100)?

Page 11: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 11/59

11

Example 2.1 (cont.)

First, we must compute the mean (or average) of this sample:

In the above example, there is some newmathematical notation. (See next slide)

1206

150101221110181101

n =

Page 12: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 12/59

12

Example 2.1 (cont.)

First, a symbol that denotes the mean

of all Xs or intelligence scores.

120

6

150101221110181101

n

=

Page 13: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 13/59

13

Example 2.1 (cont.)

The second part of the equation shows

how this quantity is computed.

120

6

150101221110181101

n

=

Page 14: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 14/59

14

Example 2.1 (cont.)

The sigma symbol ( ) tells us to sum

all the individual Xs.

120

6

150101221110181101

n

=

Page 15: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 15/59

15

Example 2.1 (cont.)

Lastly, we must divide by „n‟,

that is: the number of observations.

120

6

150101221110181101

n

=

Page 16: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 16/59

16

Example 2.1 (cont.)

Notice, these 6 people have higher than

average intelligence scores (IQ  100).

120

6

150101221110181101

n

=

Page 17: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 17/59

17

Example 2.1 (cont.)

However, is this finding likely

to hold true in repeated samples?

What if we drew 6 different people from

Thorndike University?

A one-sample t-test will help answer this

question.

It will tell us if our findings are „significant‟,or in other words, likely to be repeated if we

took another sample.

Page 18: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 18/59

18

110118

110

122

110150

120120

120

120

120120

-10- 2

-10

2

-1030

1004

100

4

100900

Example 2.1 (cont.) 

Computing the sample variance

2)(

3.201)( 2

2

n

 s x

Page 19: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 19/59

19

110118

110

122

110150

120120

120

120

120120

-10- 2

-10

2

-1030

1004

100

4

100900

Example 2.1 (cont.) 

Computing the sample variance

2)(

3.201)( 2

2

n

 s x

3.201

)( 2

2

n

 s x

Page 20: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 20/59

20

Example 2.1 (cont.) 

Computing the sample variance

To get the third column we take eachindividual „X‟ and subtract it from themean (120).

We square each result to get the fourthcolumn.

Next, we simply add up the entire

fourth column and divide by our original sample size (n = 6).

The resulting figure, 201.3, is the

sample variance.

Page 21: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 21/59

21

Example 2.1 (cont.) 

Computing the sample variance

Important:All sample variances

are computed this way!We always take the mean;

subtract each score from the mean;

square the result;sum the squares;and divide by the sample size

(how many numbers, or rows we have).

Page 22: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 22/59

22

Now that we have the mean (X = 120) and

the variance ( ) of our sample, we

have everything needed to compute whether 

the sample mean is „significantly‟ above theaverage intelligence.

In the formula that follows, we use a new

symbol mu ( ) to indicate the populationstandard value ( = 100 ) against which we

compare our obtained score (X = 120).

Example 2.1 (cont.) 

Computing the sample variance

3.2012

 x s

Page 23: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 23/59

23

Example 2.1 (cont.) 

Computing the sample variance

152.3

16333.201

100120

1

2

n s

 x

 

Our sample has „n = 6‟ people, so the degrees of 

freedom for this t-test are:

dn = n  – 1 = 5This degrees of freedom figure will be used later 

in our test of significance.

Page 24: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 24/59

24

And now for somethingcompletely different …

Let’s take a break from computations, and talk about ‘ the big picture’  

Now comes the conceptually tricky part.

Remember that a normal bell-curvedistribution is a chart that showsfrequencies (or counts).

If we measured the weight of four maleadults, for example, we might find thefollowing:

Person 1 = 70 kg, Person 2 = 75 kg, Person 3= 70 kg, Person 4 = 65 kg

Page 25: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 25/59

25

The ‘big picture’  

Person 1 = 70 kg, Person 2 = 75 kg, Person

3 = 70 kg, Person 4 = 65 kg

Plotting a count of these „weight‟ data,

we find a normal distribution:

Count 2 X

1 X X X

65 70 75 kg

Page 26: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 26/59

26

The ‘big picture’ (cont.)

As it turns out, the „t‟ statistic has its own distribution, just like any other variable.

Let‟s assume, for the moment, that the mean IQ of thepopulation in our example is exactly 100.

If we repeatedly sampled 6 people and calculateda „t‟ statistic each time, what would we find?

If we did this 4 times, for example, we might find:

Count 2 X

1 X X X

- 1 0 1 t - statistic

Page 27: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 27/59

27

The ‘t’ statistic (cont.)

Most often our computed „t‟should be around 0. Why?Because the numerator, or top part of 

the formula for t is: .

If our first sample of 6 people is trulyrepresentative of the population, then

our sample mean should also be 100,and therefore our computed t shouldbe (see next slide)

 

Page 28: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 28/59

28

0

1

100100

2

n

 s

 x

The ‘t’ statistic (cont.)

Page 29: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 29/59

29

The ‘t’ statistic (cont.)

Of course, our repeated samplesof 6 people will not always have

exactly the same mean

as the population.

Sometimes it will be a little higher, andsometimes a little lower.

The frequency with which we find a t larger than 0 (or smaller than 0) is exactly what thet-distribution is meant to represent

(see next slide)

Page 30: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 30/59

30

The ‘t’ statistic (cont.)

Page 31: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 31/59

31

In our GPA example, the actual „t‟ thatwe calculated was 3.152, which iscertainly higher than 0.

Therefore, our sample does not looklike it came from a population with amean of 100.

Again, if our sample did come fromthis population, we would most oftenexpect a computed „t‟ of 0

Read this part over and over,and think about it. This is the tricky bit.

Page 32: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 32/59

32

The ‘t’ statistic (cont.)

How do we know when

our computed „t‟ is

very large in magnitude? Fortunately, we can calculate how

often a computed sample „t‟ will be far 

from the population mean of t = 0based on knowledge of the

distribution.

Page 33: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 33/59

33

The ‘t’ statistic (cont.)

The critical values of the t-distribution show

exactly how often we should find computed

„t‟s of large magnitude.

In a slight wrinkle, we need the degrees of 

freedom (df = 5) to help us make this

determination.

Why? If we sample only a few people our computed „t‟s are more likely to be very

large, only because they are less

representative of the whole population.

Page 34: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 34/59

34

 And now, back to the computation… 

We need to find the „critical value‟ of 

our t-test.

Looking in the back of any statisticstextbook, you can find a table for critical

values of the t-distribution.

Next, we need to determine whether weare conducting a 1-tailed or 2-tailed t-test.

Let‟s refer back to the research question: 

Page 35: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 35/59

35

Example 2.1 (again)

Research Question 

On average, do the population of 

undergraduates at Thorndike

University have higher than averageintelligence scores (IQ  100)?

Page 36: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 36/59

36

Example 2.1 (cont.)

This is a 1-tailed test, because we are askingif the population mean is „greater ‟ than 100. 

If we had only asked whether the

intelligence of students were „different‟ fromaverage (either higher or lower) then the testwould be 2-tailed.

In the appendixes of your textbook, look atthe table titled, „critical values of the t-

distribution‟. Under a 1-tailed test with an Alfa-level of 

and degrees of freedom df = 5, and youshould find a critical value (C.V.) of t = 2.02.

Page 37: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 37/59

37

Example 2.1 (cont.)

Is our computed t = 3.152greater than the C.V. = 2.02?

 Yes!Thus we reject the null hypothesis and live happily ever after.

Right?

Not so fast.What does this really mean?

Page 38: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 38/59

38

Example 2.1 (still)

We assume the null hypothesis when

making this test.

We assume that the population meanis 100, and therefore we will most often

compute a t = 0.

Sometimes the computed „t‟ might be abit higher and sometimes a bit lower.

Page 39: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 39/59

39

What does the ‘critical value’ tell us? 

Based on knowledge of the distributiontable we know that 95% of the time, inrepeated samples, the computed „t‟

statistics should be less than 2.02.

That‟s what the critical value tells us.

It says that when we are sampling 6 personsfrom a population with mean intelligencescores of 100, we should rarely compute a„t‟ higher than 2.02. 

Page 40: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 40/59

40

What happens if 

we do calculate a ‘t’ greater than 2.02? 

Well, we can be pretty confident that our 

sample does not come from a population

with a mean of 100!

In fact, we can conclude that the population

mean intelligence must be higher than 100.

How often will we be wrong in this

conclusion? If we do these t-tests a lot, we‟ll be wrong

5% of the time. That‟s the Alfa level (or 5%).

Page 41: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 41/59

Page 42: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 42/59

42

Statistical inference

 You should notice that the conclusion

makes an inference about the population of 

students from Thorndike University based

on a small sample.

This is why we call this type of a test

„statistical inference.‟ We are inferring something about the

population based on only a sample of 

members.

Page 43: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 43/59

43

Example 2.1 Using SPSS

First, variables must be setup in the variable

view of the SPSS Data Editor as detailed in

the previous chapter:

Page 44: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 44/59

44

Example 2.1 Using SPSS (cont.)

Next, the data must be entered in the data view of the SPSS Data Editor:

Page 45: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 45/59

45

Instructionsfor the Student Version of SPSS 

If you have the student version of 

SPSS, you must run all procedures

from the pull-down menus. Fortunately, this is easy for the one-

sample t-test.

First select the correct procedure from

the „analyze‟ menu see next slide 

Page 46: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 46/59

46

The ‘analyze’ menu 

Page 47: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 47/59

47

The ‘test variable’  

Next, you must move the „test variable‟, in thiscase IQ, into the right-hand pane by pressingthe arrow button and change the „test-value‟

to 100 (our standard for comparison). Lastly, click „OK‟ to view the results: 

Page 48: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 48/59

48

Instructions forFull Version of SPSS (Syntax Method)

An alternate method for obtaining the sameresults is available to users of the full-version of SPSS.

This method, known as „syntax‟, isdescribed here, because many common anduseful procedures in statistics are onlyavailable using the syntax method.

Users of the student version may wish to

skip ahead to „Results from the SPSSViewer.‟

To use syntax, first you must open thesyntax window from the „file‟ menu:  

Page 49: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 49/59

49

The ‘file’ menu 

Page 50: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 50/59

50

SPSS syntax

The following is generic syntaxfor the one-sample t-test:

t-test testval= TestValue 

/variables= TestVariable.

The SPSS syntax above requires that yousubstitute two values.

First, you need the „ TestValue‟ againstwhich you are judging your sample.

In example 2.1, this standard is „100.‟

Page 51: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 51/59

51

 TestVariable 

Next, you must substitute the „ TestVariable,‟

as shown below:

Page 52: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 52/59

52

Results from SPSS Viewer

After selecting „Run – All‟ from the menu, the

results will appear in the SPSS output window:

Page 53: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 53/59

53

SPSS calculations

When using SPSS, we no longer have acritical value to compare our calculatedt-value.

Instead, SPSS calculates an exactprobability value associated with the „t.‟

As a consequence, when writing the resultswe simply substitute this exact value, rather 

than using the less precise „p < .05‟ (per our hand-calculations above).

Notice that SPSS calls p-values „Sig.,‟ whichstands for significance.

Page 54: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 54/59

54

SPSS calculations NOTE: SPSS only gives us the

p-value for a 2-tailed t-test.

In order to convert this value into a one-tailed test, per our example, we need todivide this „sig (2-tailed)‟ value in half (e.g., .033/2=.02, rounded).

Why?

In short, one-tailed t-tests are twice aspowerful, because we simply assume thatthe results cannot be different in thedirection opposite to our expectations.

Page 55: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 55/59

55

Conclusions in APA Style

Focusing attention on the bold

portion of the output, we canre-write our conclusion in APA style:

The mean intelligence score of 

undergraduates at Thorndike University

(M = 120) was significantly higher thanthe standard intelligence score (M =

100), t(5) = 3.15, p = .02 (one-tailed).

Page 56: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 56/59

56

Big t  Little p ?

Remember from a previous session thatevery t-value that we might calculate isassociated with a unique p-value.

In general, t-values which are large inabsolute magnitude are desirable, becausethey help us to demonstrate differencesbetween our computed mean value and the

standard. Values of t that are large in absolute

magnitude are always associated with smallp-values.

Page 57: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 57/59

57

Significance According to tradition in psychology,

p-values which are lower than .05 aresignificant, meaning that we will likely

still find differences if we collectedanother sample of participants.

When using SPSS we are no longer 

confronted with a „critical value.‟Instead, we can simply observe thatthe p-value is less than „.05.‟

Page 58: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 58/59

58

Accepting the null hypthosis

The conclusion as to whether to rejectthe null hypothesis will be the same ineach circumstance; whether computed

by-hand or by-computer.

Page 59: 02a One Sample T-Test

7/28/2019 02a One Sample T-Test

http://slidepdf.com/reader/full/02a-one-sample-t-test 59/59

59

The One-Sample t-Test

Advanced Research Methods in Psychology

Week 1 lecture

Matthew Rockloff