Download presentation
Presentation is loading. Please wait.
Published byἈχιλλεύς Αυγερινός Modified over 5 years ago
1
Z-test and T-test Chong Ho (Alex) Yu 8/12/2019 1:50 AM
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
Z-test A statistical test for which the test statistics can form a normal distribution owing to the central limit theorem. Rarely used (I never used it in my whole life, so far). Why? You can run a z-test if and only if the population variance is known. But how often do you have access to the population-level information? Let’s skip it.
3
One-sample t-test One-sample t-test
Test the sample mean against the population mean To see whether there is a big gap between the sample and the population To see whether the sample comes from or belongs to the population. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
4
Revisit the same example
In California the average SAT score is 1500. A superintendent wanted to know whether the mean score of his students is significantly behind the state average. 50 students Average SAT score =1495 Standard deviation is 100 You don’t need a commercial software app. There are many online stat calculators e.g.
5
Online one-sample t-test calculator
6
Online one-sample t-test calculator
7
Online one-sample t-test calculator
8
P value Simplified explanation: what is the probability (chance) of obtaining this test statistics in the long run given that the null hypothesis is true? The so-called “performance gap” between his students and the state average is 5 points only. If this happens by chance alone, it would be about 7 out of 10 times (p = .7252). It is not an extraordinary phenomenon. He should side with the null hypothesis: There is no significant performance gap between his students and others.
9
Online one-sample t-test calculator
You are not sure whether the true performance gap between your students and others is exactly 5. It could be as low as or as high as
10
One-sample t-test in SPSS
JMP needs more steps for 1-sample t-test and so we will do it in SPSS only. Open ”between_within.sav”
11
One-sample t-test in SPSS
Assume that at the university the average midterm score in psychology is 90. I want to know whether there is any significant difference between the average midterm score of my student and that of all psychology majors.
12
One-sample t-test in SPSS
The 2-tailed p value is .038, which is less than .05. By chance alone, it could happen about 3.8 time out of 100 in the long run. There is a real performance gap!
13
Assignment Use the online one-sample t-test calculator: The average state annual household income is $65,000. In a sample of 500, the average county annual household income is $64,000. and the SD is 1,000. Is there a significant difference between the state average and the county average?
14
Two independent sample t-test
You need two independent groups e.g. boys and girls. Test whether there is a performance gap between boys and girls
15
T-test T-test is a test to get the t-ratio.
The difference between two means based on the standard deviation. Virtually any comparison test is about looking at the difference adjusted by a common standard Otherwise, it will be comparing apples and oranges!
16
Assumptions The observations (the behaviors of the participants) are independent (e.g. If students help each other in homework, then we cannot know their actual performance level). The values in the dependent variable are normally distributed. The variances (dispersion) of the two groups are similar.
17
2- independent sample t-test in SPSS
Use the same data: between_within.sav
18
2- independent sample t-test in SPSS
Use the same data: between_within.sav
19
2- independent sample t-test in SPSS
Use the same data: between_within.sav
20
2- independent sample t-test in SPSS
Before we look at the inferential statistics, we should look at the descriptive statistics first. The sample mean score of male students (85.88) is higher than that of females (72.29). The standard error (SE shows how much bias) of male mean score is lower than that of females. How many of you would say that boys are smarter than girls in terms of midterm test performance?
21
2- independent sample t-test in SPSS
Before we look at the t-test result, we need to look at the Levene’s test of equal (or unequal) variances. The p value (sig.) is .362. The null hypothesis is: there is no significant difference between the male and female variances. The data structure meets the assumption for t-test. Now we can proceed to look at the t-test result.
22
2- independent sample t-test in SPSS
Because the variances are equal, we need to look at the first row only. The 2-tailed p value of the t-test is .142. Despite that male students outperformed female students by more than 13 points ( )., the t-test shows that there is no significant performance gap.
23
2- independent sample t-test in JMP
Open “between_within.jmp”
24
2- independent sample t-test in JMP
Choose unequal variances from the red triangle to examine whether the male and female variances are similar.
25
2- independent sample t-test in JMP
SPSS has only one test (Levene’s test) to examine equality of variances. JMP has five! It is always good to get a second opinion. All five tests have high p values, pointing to the same conclusion: the two variances are equal. Now you can procced to perform a t-test.
26
2- independent sample t-test in JMP
Choose Means/ANOVA/Pooled t from the red triangle
27
2- independent sample t-test in JMP
Ignore the green diamonds now; will be explained in the next unit. Unlike SPSS that reports the 2-tailed p only, JMP reported both 1-tailed and 2-tailed p values. P > |t|: 2-tailed P > t: 1-tailed
28
2- independent sample t-test in JMP
Because we know that the variances are equal, we used the t-test that assumes equal variance. If you choose “t-test”, the result assumes unequal variances. But it is wrong in this case.
29
Assignment Use either SPSS or JMP Use the data “between-within”
Run a 2-sample independent t-test. Use the final as the DV Use sex (gender) as the IV Test whether the variances are equal before proceeding to the t-test. Report the confidence intervals and the p value. Is there any performance gap between boys and girls in final?
30
I come here to bring division!
In experiments we want to have two comparable groups; we want to reduce bias. We will divide the class into two groups But the two groups must be equivalent or symmetrical i.e. the same numbers of two genders; the same numbers of different races; the same numbers of different SES, religion…etc. Can you do that?
31
2 dependent sample t-test
Also known as 2 correlated sample t-test Paired t-test Match-paired When you have no control group… You are your own control. The person that is most similar to you is: YOU!
32
2- dependent sample t-test in SPSS
33
2- dependent sample t-test in SPSS
34
2- dependent sample t-test in SPSS
The correlation between midterm and final is .6. It is significant (p = .017). Students who did well in midterm are likely to do well in the final, and vice versa.
35
2- dependent sample t-test in SPSS
The two-tailed p value (sig.) is .196. In the standpoint of the professor, I expect learners can improve their performance from midterm to final. I want a one-tailed test! You can get that by manually divide the 2-tailed p value by 2. .196/2 = .098
36
Before you do the same test in JMP
You need to know… Ceiling effect: some learners are too good. No room for improvement. Floor effect: Some learners are unprepared; they are unresponsive to any treatment.
37
Spot ceiling or floor effects
38
Spot ceiling or floor effects
Paul had hit the ceiling. When you have 15 students, you can look at the table row by row. But you need the parallel plot when you have a big sample.
39
Before you do the test… You should exclude Paul from the analysis.
This observation is not deleted; it is still in the data set.
40
2- dependent sample t-test in JMP
41
2- dependent sample t-test in JMP
42
2- dependent sample t-test in JMP
The JMP results are different from the SPSS results because one student is excluded. Correlation: 1-tailed p value = .0983). Insignificant!
43
Assignment (Canvas) Use SPSS or JMP Use the data “between-within”
Run a paired t-test Use test and midterm as the variables Spot and exclude students that show floor or ceiling effects, if there is any. Report the correlation coefficient, the confidence intervals and the p value Is there any significant change/growth between the test and the midterm?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.