Computing Central Tendency, Variance and Standard Deviation
Quiz | Midterm Exam | Final Exam | Total Grade | ||||
Mean | 7.55 | Mean | 77.40 | Mean | 78.20 | Mean | 81.72 |
Median | 7.00 | Median | 77.00 | Median | 76.00 | Median | 80.64 |
Mode | 7.00 | Mode | 77.00 | Mode | 73.00 | Mode | #N/A |
Standard Deviation | 1.36 | Standard Deviation | 11.39 | Standard Deviation | 11.02 | Standard Deviation | 8.66 |
Sample Variance | 1.84 | Sample Variance | 129.62 | Sample Variance | 121.43 | Sample Variance | 75.02 |
Range | 5.00 | Range | 37.00 | Range | 37.00 | Range | 29.11 |
Paired Sample T-test
Determine if there is a meaningful difference between midterm exam scores and final exam scores for the students in class one.
Paired sample t-test for the midterm and final score show that the difference between the scores are not statistically significant as the p-value is 0.52 which is greater than level of significance.
t-Test: Paired Two Sample for Means | ||
Midterm Exam | Final Exam | |
Mean | 77.40 | 78.20 |
Variance | 129.62 | 121.43 |
Observations | 20.00 | 20.00 |
Hypothesized Mean Difference | - | |
df | 19.00 | |
t Stat | (0.65) | |
P(T<=t) two-tail | 0.52 | |
t Critical two-tail | 2.09 |
Two-sample T-test Analysis
t-Test: Two-Sample Assuming Equal Variances | ||
Midterm Exam | Midterm Exam | |
Mean | 77.40 | 74.80 |
Variance | 129.62 | 114.37 |
Observations | 20.00 | 30.00 |
Pooled Variance | 120.41 | |
Hypothesized Mean Difference | - | |
df | 48.00 | |
t Stat | 0.82 | |
P(T<=t) two-tail | 0.42 | |
t Critical two-tail | 2.01 |
The two-sample t-test indicates that the difference between averages of two midterm exam scores are not statistically significant as p-value 0.22 is greater than 0.05.
t-Test: Two-Sample Assuming Equal Variances | ||
Final Exam | Final Exam | |
Mean | 78.20 | 74.30 |
Variance | 121.43 | 119.32 |
Observations | 20.00 | 30.00 |
Pooled Variance | 120.16 | |
Hypothesized Mean Difference | - | |
df | 48.00 | |
t Stat | 1.23 | |
P(T<=t) two-tail | 0.22 | |
t Critical two-tail | 2.01 |
ANOVA F-statistics
ANOVA | |||||
df | SS | MS | F | Significance F | |
Regression | 1.00 | 4,126.72 | 4,126.72 | 108.64 | 0.00 |
Residual | 48.00 | 1,823.30 | 37.99 | ||
Total | 49.00 | 5,950.02 |
Coefficients | Standard Error | t Stat | P-value | |
Intercept | 12.22 | 6.17 | 1.98 | 0.05 |
Midterm Exam | 0.84 | 0.08 | 10.42 | 0.00 |
The regression model also gives an estimate of coefficient which means for each unit increase in midterm score, average increase in final exam score is 0.84.
Bonus: Using only the scores from class one, and looking at the three variables quiz score, midterm exam score, and final exam score, which of these variables are significant predictors of total grade in the course?
Yes. The quiz score, midterm score, final exam score is highly efficient in predicting the total score with R2 of 0.91 indicating that regression model was able to explain 91% of variance in the data. The ANOVA F-statistic also yields significant result with F = 52.07, p<0.001.
ANOVA | |||||
df | SS | MS | F | Significance F | |
Regression | 3.00 | 1,292.87 | 430.96 | 52.07 | 0.00 |
Residual | 16.00 | 132.42 | 8.28 | ||
Total | 19.00 | 1,425.29 |
Coefficients | Standard Error | t Stat | P-value | |
Intercept | 22.66 | 4.82 | 4.70 | 0.00 |
Quiz | 0.01 | 0.73 | 0.02 | 0.99 |
Midterm Exam | 0.39 | 0.14 | 2.76 | 0.01 |
Final Exam | 0.37 | 0.13 | 2.94 | 0.01 |
Among the three predictors, midterm score and final exam score were statistically significant in predicting the total grade, but the quiz score was not!
The second data set includes one table providing data on students in four college majors, including scores on an anxiety inventory, GPA in major, and GPA overall.
What are the frequencies of each major?In looking at the frequency of each major, do you observe any potential issue? How do you think that issue might be resolved?
Major | Count of Major |
Business | 8 |
Philosophy | 6 |
Pre-Med | 14 |
Psychology | 12 |
Grand Total | 40 |
Row Labels | Average of Anxiety |
Business | 17.00 |
Philosophy | 15.00 |
Pre-Med | 18.93 |
Psychology | 17.00 |
ANOVA | ||||||
Source of Variation | SS | df | MS | F | P-value | F crit |
Between Groups | 70.45 | 3.00 | 23.48 | 1.18 | 0.33 | 2.87 |
Within Groups | 718.93 | 36.00 | 19.97 | |||
Total | 789.38 | 39.00 |
Comparing each of the four majors against each other at once, is there a meaningful difference in the average GPA in major? Comparing each of the four majors against each other at once, is there a meaningful difference in the average overall GPA?
No. There is no significant differences in Average GPA in majors across different majors.
ANOVA | ||||||
Source of Variation | SS | df | MS | F | P-value | F crit |
Between Groups | 0.53 | 3.00 | 0.18 | 1.42 | 0.25 | 2.87 |
Within Groups | 4.45 | 36.00 | 0.12 | |||
Total | 4.98 | 39.00 |
t-Test: Paired Two Sample for Means | ||
GPA in Major | Overall GPA | |
Mean | 3.48 | 3.33 |
Variance | 0.13 | 0.15 |
Observations | 40.00 | 40.00 |
Pearson Correlation | 0.83 | |
Hypothesized Mean Difference | - | |
df | 39.00 | |
t Stat | 4.47 | |
P(T<=t) two-tail | 0.00 | |
t Critical two-tail | 2.02 |
We also use regression model to test if Anxiety is significant predictor of overall GPA or not. It turns out that Anxiety level is significant predictor of overall GPA with F = 7.74, p = 0.01. The model has multiple R2 = 0.17 indicating that Anxiety account for 17% of variance in the overall GPA.
ANOVA | |||||
df | SS | MS | F | Significance F | |
Regression | 1.00 | 0.97 | 0.97 | 7.74 | 0.01 |
Residual | 38.00 | 4.75 | 0.13 | ||
Total | 39.00 | 5.72 |
Coefficients | Standard Error | t Stat | P-value | |
Intercept | 2.72 | 0.23 | 12.05 | 0.00 |
Anxiety | 0.04 | 0.01 | 2.78 | 0.01 |
The estimated coefficients show that the anxiety has significant positive relationship with the GPA. Each unit increase in Anxiety, on an average, increases overall GPA by 0.04.
Bonus: For the entire group of students, determine the magnitude and direction of the relationship between grade-point-average in major and grand-point-average overall. You should have been able to guess what you would find before calculating anything or even looking at a single value; why?
Based on my guess, I would say the GPA in Major would be highly correlated to the overall GPA and the relationship will be positive. This is because we expect student who score high for major, to score for other courses as well. Similarly, for students who are unable to score in majors, it is expected that they would score low in other courses as well.
The guess is verified by the data:
Regression Statistics | |
Multiple R | 0.83 |
R Square | 0.69 |
Adjusted R Square | 0.68 |
Standard Error | 0.22 |
Observations | 40 |
Data Set 2 – Four Majors | ||||
Participant | Anxiety | GPA in Major | Overall GPA | Major |
1 | 17 | 3.60 | 3.36 | Pre-Med |
2 | 12 | 3.33 | 3.00 | Psychology |
3 | 13 | 3.67 | 3.38 | Philosophy |
4 | 16 | 4.00 | 3.70 | Pre-Med |
5 | 13 | 3.50 | 3.30 | Psychology |
6 | 17 | 3.33 | 3.13 | Business |
7 | 13 | 3.50 | 3.45 | Philosophy |
8 | 21 | 3.80 | 3.75 | Pre-Med |
9 | 15 | 3.00 | 3.00 | Pre-Med |
10 | 23 | 2.50 | 2.70 | Business |
11 | 17 | 3.75 | 3.18 | Psychology |
12 | 24 | 3.80 | 3.89 | Psychology |
13 | 24 | 4.00 | 3.80 | Philosophy |
14 | 22 | 3.75 | 3.40 | Psychology |
15 | 18 | 3.67 | 3.60 | Pre-Med |
16 | 14 | 3.67 | 3.56 | Psychology |
17 | 23 | 3.50 | 3.50 | Business |
18 | 13 | 3.67 | 3.00 | Business |
19 | 17 | 3.60 | 3.36 | Pre-Med |
20 | 12 | 3.33 | 3.00 | Business |
21 | 22 | 3.50 | 3.18 | Pre-Med |
22 | 19 | 3.50 | 3.10 | Psychology |
23 | 23 | 3.00 | 3.00 | Pre-Med |
24 | 25 | 3.25 | 3.18 | Pre-Med |
25 | 23 | 3.33 | 3.09 | Psychology |
26 | 24 | 3.67 | 3.80 | Psychology |
27 | 13 | 2.75 | 2.40 | Business |
28 | 11 | 3.00 | 2.81 | Psychology |
29 | 16 | 3.60 | 3.36 | Pre-Med |
30 | 14 | 3.00 | 3.30 | Business |
31 | 8 | 3.00 | 2.77 | Philosophy |
32 | 19 | 3.80 | 3.89 | Pre-Med |
33 | 13 | 3.00 | 2.67 | Philosophy |
34 | 13 | 3.67 | 3.56 | Psychology |
35 | 21 | 4.00 | 3.89 | Business |
36 | 19 | 3.67 | 3.30 | Philosophy |
37 | 18 | 3.67 | 3.80 | Pre-Med |
38 | 21 | 4.00 | 4.00 | Pre-Med |
39 | 12 | 3.67 | 3.40 | Psychology |
40 | 17 | 3.25 | 3.60 | Pre-Med |