Professional Documents
Culture Documents
I took variable SAT to run One-Sample t-test. Firstly, we should check is data normally distributed.
Normality of data is needed to Sample mean be more close to Population mean, so the results of our
analysis will be more reliable. I checked normality by the histogram in Stata 14. As it is seen in the
Figure 1 below, data of students’ SAT scores is not normally distributed, it has outliers and it is right
skewed. In order to make it normally distributed, we need to get rid of outliers. We can trim data where
SAT scores are more than 1380. Figure 2 shows the histogram of SAT after we deleted outliers and it is
normally distributed now.
Figure 1. Histogram of SAT Figure 2. Histogram of SAT after trimming the data
.003
.003
.002
.002
0
0
400 600 800 1000 1200 1400 400 600 800 1000 1200 1400
SAT SAT
Hypotghesis(H1) here is that average of SAT is not equal to 1000. The results of the test provided in the
Table 1 below. According to this table, P value=0.000, which is less than 0.05, or in other words
possibility of H0 is true is close to 0. Therefore, our H0, stating that the average of SAT score, is 1000 is
rejected(there is a significant difference between 1000 and actual average of SAT). So, our H1, which
states that mean is not equal to 1000 is not rejected.
The other way to decide reject or not reject the H0 is using critical value approach. By using excel I found
that critical value for this example with the degree of freedom 727, is 1.96. As I understood, it means
that if absolute value of t is more than 1.96 then we can reject our H0. According to the Table 1, |t|=|-
17|=17, which is >1.96, so our H0 is rejected.
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Ha: mean < 1000 Ha: mean != 1000 Ha: mean > 1000
Pr(T < t) = 0.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 1.0000
b) For conducting Two Sample t-test I chose course GPA and gender identity of students. Again, before
test we check the normality of course GPA. I checked, it is not normally distributed, so I deleted course
GPA scores which are more than 3.4. In these test we are testing is there any significant difference
between (means) course GPA of female and male.
H0: There is no significant difference between course GPA means of female and male students
H1: There is a significant difference between course GPA means of female and male students
The results from the test are given in the Table 2. According to this table t-test show that P
value=0.0912, which is >0.05, so our H0 is not rejected. It means that there is actually no statistically
significant difference between course GPA means of female and male students
Absolute value of t is 1.69, critical value for df=718 is 1.96. Because 1.69<1.96 we are failed to reject H0.
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
H0: There is no significant difference between means of course GPA and term GPA
H0: There is a significant difference between means of course GPA and term GPA
(I did the same operations as before to make data normally distributed.) According to the conducted
ttest, p value is 0.000, which is <0.05 and it means our H0 is rejected and H1 stating that there is
statistically significant difference between means of course GPA and term GPA is true. Table with results
of this test is provided in Table 3.
Absolute value of t is 16.46, critical value for df=705 is 1.96. Because 16.46>1.96 we reject H0.
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
It should be noted that in a and b, the size of variables is different (for example in *a* part there are 548
males and 180 females). So, our results can be not reliable.
Firstly, I found standard deviation of SAT and then conducted ztest. Results shown in Table 4 below. It
shows that P value here =0.9099,which is >0.05, or in other words possibility of H0 is true is 90%.
Therefore, our H0, stating that the average of SAT score, is 900 is not rejected(there is no statistically
significant difference between 900 and actual average of SAT, which is 899).
If we use critical values, then z=-0.1131 and by using table for the 5% confidence level z value is 0.44.
Because confidence level is 0.05, z value should be between -1.96 and 1.96 in order to not reject H0. So,
0.44 is in this range, that is why we are failed to reject H0.
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Ha: mean < 900 Ha: mean != 900 Ha: mean > 900
Pr(Z < z) = 0.4550 Pr(|Z| > |z|) = 0.9099 Pr(Z > z) = 0.5450
b) For the two-sample z-test I used course GPA and term GPA. In these ztest we are testing is there any
significant difference between (means) course GPA of female and male.
H0: There is no significant difference between course GPA means of female and male students
H1: There is a significant difference between course GPA means of female and male students
Again, firstly, I found sd for these two variables and run the test. According to the results shown in Table
5, P value=0.1463, which is >0.05, so our H0 is not rejected. It means that there is actually no statistically
significant difference between course GPA means of female and male students.
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
c) Used variables: term GPA, course GPA. In this paired z-test test we are testing is there any significant
difference between (means) of course GPA and term GPA of students.
H0: There is no significant difference between means of course GPA and term GPA
H0: There is a significant difference between means of course GPA and term GPA
According to the results of z-test(Table 6), probability value is close to 0, which means that H0 is not
true, so we reject H0 and say that there is actually a significant difference between means of course GPA
and term GPA.
3) For this I used the same data which I used in 2. c) part above. In order to calculate confidence interval
we used formula mean+ - (z(a/2)*sd/√n (All calculations are provided in do-file). The results show that
with the 95% confidence level mean will be between .38671815 and .45836165
4) For this I used the same data which I used in 2. b) part above. Stata shows statistic power of 0.4032.
In order to be sure that we do not make Type Error I, II, Static power should be more than 80%. In this
example we got 40.32% of Statistic power as shown in Table 7, which means that we can make mistakes
and our results can be not reliable.
Study parameters:
alpha = 0.0500
N = 706
N per group = 353
delta = 0.0270
m1 = 2.7663
m2 = 2.7933
sd1 = 0.2018
sd2 = 0.2156
Estimated power:
power = 0.4032