Professional Documents
Culture Documents
- lecture -
Matthew Rockloff
1
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.
2
In 1908 Gosset published his findings in the journal Biometrika under the pseudonym student. This is why the t-test is often called the students t.
Thus ???
Beer is the cause of and solution to all of life's problems.
(Homer Simpson)
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 you understand the meaning behind each of the techniques, the more the choice will become obvious.
6
Example illustrates the calculation of the one-sample t-test. This test is used to compare a list of values to a set standard.
As illustrated next, the standard is usually chosen for its theoretical or practical importance.
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 all students at the university is higher than 100. In simple terms, are the university students smarter than average?
8
X
Person 1: Person 2: Person 3: Person 4: Person 5: Person 6: 110 118 110 122 110 150
9
Research Question
On average, do the population of undergraduates at Thorndike University have higher than average intelligence scores (IQ 100)?
10
In the above example, there is some new mathematical notation. (See next slide)
11
120
12
120
The second part of the equation shows how this quantity is computed.
13
120
14
120
15
120
Notice, these 6 people have higher than average intelligence scores (IQ 100).
16
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.
17
110 118 110 122 110 150 120 120 120 120 120 120
( )
-10 -2 -10 2 -10 30 100 4 100 4 100 900
s
2 x
( )
n
201 . 3
18
( ) 2
120 120 120 120 120 120
( )
n
201 . 3
19
To get the third column we take each individual X and subtract it from the mean (120). We square each result to get the fourth column. 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. 20
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).
21
Now that we have the mean (X = 120) and 2 the variance ( s x 201. 3 ) of our sample, we have everything needed to compute whether the sample mean is significantly above the average intelligence. In the formula that follows, we use a new symbol mu ( ) to indicate the population standard value ( = 100 ) against which we compare our obtained score (X = 120).
22
dn = n 1 = 5
This degrees of freedom figure will be used later in our test of significance.
23
24
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
65
X
70
X
75 kg
25
As it turns out, the t statistic has its own distribution, just like any other variable. Lets assume, for the moment, that the mean IQ of the population in our example is exactly 100. If we repeatedly sampled 6 people and calculated a t statistic each time, what would we find? If we did this 4 times, for example, we might find:
Count 2
1 X
-1
X
X
0
X
1
t - statistic
26
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 truly representative of the population, then our sample mean should also be 100, and therefore our computed t should be (see next slide)
27
100 100 s
2 x
0
28
n 1
Of course, our repeated samples of 6 people will not always have exactly the same mean as the population.
Sometimes it will be a little higher, and sometimes a little lower. The frequency with which we find a t larger than 0 (or smaller than 0) is exactly what the t-distribution is meant to represent (see next slide)
29
30
Read this part over and over, and think about it. This is the tricky bit.
In our GPA example, the actual t that we calculated was 3.152, which is certainly higher than 0. Therefore, our sample does not look like it came from a population with a mean of 100. Again, if our sample did come from this population, we would most often expect a computed t of 0
31
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 = 0 based on knowledge of the distribution.
32
The critical values of the t-distribution show exactly how often we should find computed ts 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 ts are more likely to be very large, only because they are less representative of the whole population.
33
We need to find the critical value of our t-test. Looking in the back of any statistics textbook, you can find a table for critical values of the t-distribution. Next, we need to determine whether we are conducting a 1-tailed or 2-tailed t-test. Lets refer back to the research question:
34
Research Question
On average, do the population of undergraduates at Thorndike University have higher than average intelligence scores (IQ 100)?
35
This is a 1-tailed test, because we are asking if the population mean is greater than 100. If we had only asked whether the intelligence of students were different from average (either higher or lower) then the test would be 2-tailed. In the appendixes of your textbook, look at the table titled, critical values of the tdistribution. Under a 1-tailed test with an Alfa-level of and degrees of freedom df = 5, and you should find a critical value (C.V.) of t = 2.02.
36
We assume the null hypothesis when making this test. We assume that the population mean is 100, and therefore we will most often compute a t = 0. Sometimes the computed t might be a bit higher and sometimes a bit lower.
38
Based on knowledge of the distribution table we know that 95% of the time, in repeated samples, the computed t statistics should be less than 2.02.
Thats what the critical value tells us. It says that when we are sampling 6 persons from a population with mean intelligence scores of 100, we should rarely compute a t higher than 2.02.
39
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, well be wrong 5% of the time. Thats the Alfa level (or 5%).
40
The mean intelligence score of undergraduates at Thorndike University (M = 120) was significantly higher than the standard intelligence score (M = 100), t(5) = 3.15, p < .05 (one-tailed).
41
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.
42
First, variables must be setup in the variable view of the SPSS Data Editor as detailed in the previous chapter:
43
Next, the data must be entered in the data view of the SPSS Data Editor:
44
If you have the student version of SPSS, you must run all procedures from the pull-down menus. Fortunately, this is easy for the onesample t-test. First select the correct procedure from the analyze menu see next slide
45
46
Next, you must move the test variable, in this case IQ, into the right-hand pane by pressing the arrow button and change the test-value to 100 (our standard for comparison). Lastly, click OK to view the results:
47
An alternate method for obtaining the same results is available to users of the fullversion of SPSS. This method, known as syntax, is described here, because many common and useful procedures in statistics are only available using the syntax method. Users of the student version may wish to skip ahead to Results from the SPSS Viewer. To use syntax, first you must open the syntax window from the file menu:
48
49
SPSS syntax
The following is generic syntax for the one-sample t-test: t-test testval=TestValue /variables=TestVariable.
The SPSS syntax above requires that you substitute two values. First, you need the TestValue against which you are judging your sample. In example 2.1, this standard is 100.
50
TestVariable
51
After selecting Run All from the menu, the results will appear in the SPSS output window:
52
SPSS calculations
When using SPSS, we no longer have a critical value to compare our calculated t-value. Instead, SPSS calculates an exact probability value associated with the t. As a consequence, when writing the results we 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., which stands for significance.
53
SPSS calculations
The mean intelligence score of undergraduates at Thorndike University (M = 120) was significantly higher than the standard intelligence score (M = 100), t(5) = 3.15, p = .02 (one-tailed).
55
Big t Little p ?
Remember from a previous session that every t-value that we might calculate is associated with a unique p-value. In general, t-values which are large in absolute magnitude are desirable, because they help us to demonstrate differences between our computed mean value and the standard. Values of t that are large in absolute magnitude are always associated with small p-values.
56
Significance
According to tradition in psychology, p-values which are lower than .05 are significant, meaning that we will likely still find differences if we collected another sample of participants.
When using SPSS we are no longer confronted with a critical value. Instead, we can simply observe that the p-value is less than .05.
57
The conclusion as to whether to reject the null hypothesis will be the same in each circumstance; whether computed by-hand or by-computer.
58
Week 1 lecture
Matthew Rockloff
59