First, this is using a correlation to determine if there is a statistically significant correlation between the age of the students and their GPAs

cor.test(thesis$Age, thesis$GPA1)

    Pearson's product-moment correlation

data:  thesis$Age and thesis$GPA1
t = 0.25668, df = 39, p-value = 0.7988
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.2699939  0.3443673
sample estimates:
       cor 
0.04106779 

The correlation between Age and Self Esteem was statistically significant, r(40) = .04, ns.

Next, this is running a t test to determine if there is a difference between the first GPA of students in the Business College and the Arts College.

t.test(thesis$GPA1 ~ thesis$College)

    Welch Two Sample t-test

data:  thesis$GPA1 by thesis$College
t = -1.2753, df = 38.772, p-value = 0.2098
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.7143396  0.1619586
sample estimates:
mean in group AS mean in group BU 
         3.02381          3.30000 

BU (M = 3.30) had slightly higher GPA1 than AS (M = 3.02), t(38.77) = 1.28, p > .05.

Next, this is running another t test to see if there is a difference between the first GPA of communications majors and accounting majors. However, in the sample data there is more than 2 choices for major meaning a new category for the data of just the two majors must be inputed as well.

thesis %>% 
  filter(Major == "Comm" | Major == "Account") -> ComAccMajor

t.test(ComAccMajor$GPA1 ~ ComAccMajor$Major)

    Welch Two Sample t-test

data:  ComAccMajor$GPA1 by ComAccMajor$Major
t = 0.95153, df = 5.297, p-value = 0.3827
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.7868789  1.7368789
sample estimates:
mean in group Account    mean in group Comm 
                3.675                 3.200 

Accounting (M = 3.68) had a higher GPA1 than Communications (M = 3.20), t(5.30) = 0.95, p < .05.

Next, this is running a paired t test to analyze if there is a difference between mood 1 and mood 2.

t.test(thesis$Mood1, thesis$Mood2, paired = T)

    Paired t-test

data:  thesis$Mood1 and thesis$Mood2
t = -2.1686, df = 40, p-value = 0.03611
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.80105415 -0.02821414
sample estimates:
mean of the differences 
             -0.4146341 

Moods were higher at time 2 (M = .2381) than at time 1 (M = -.2381), t(40) = 2.17, p < .05.

The next test being used is a chi squared test to analyze if there is a relationship between where students are from and which college they are in.

table(thesis$Home, thesis$College)
            
             AS BU
  Billings    5  6
  OtherMT    11  7
  OutofState  6  6
chisq.test(thesis$Home, thesis$College)

    Pearson's Chi-squared test

data:  thesis$Home and thesis$College
X-squared = 0.76438, df = 2, p-value = 0.6824

There was not a statistically significant relationship between where home is for the students and which college they are in, chi-square(2) = 0.76, p = .68.

Finally, this runs one last t test to determine if there is a relationship between where students are from and their self esteem.

table(thesis$Home, thesis$SelfEsteem)
            
             14 18 21 22 23 24 25 26 27 28 29
  Billings    0  0  0  2  0  4  1  3  0  1  1
  OtherMT     1  0  1  3  2  3  3  3  1  1  0
  OutofState  0  1  0  0  1  3  1  3  2  0  1
chisq.test(thesis$Home, thesis$SelfEsteem)
Chi-squared approximation may be incorrect

    Pearson's Chi-squared test

data:  thesis$Home and thesis$SelfEsteem
X-squared = 15.089, df = 20, p-value = 0.7713

There was not a statistically significant relationship between where home is for the students and their self esteem, chi-square(20) = 15.09, p = 0.77.

LS0tDQp0aXRsZTogIlIgTm90ZWJvb2siDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KDQpGaXJzdCwgdGhpcyBpcyB1c2luZyBhIGNvcnJlbGF0aW9uIHRvIGRldGVybWluZSBpZiB0aGVyZSBpcyBhIHN0YXRpc3RpY2FsbHkgc2lnbmlmaWNhbnQgY29ycmVsYXRpb24gYmV0d2VlbiB0aGUgYWdlIG9mIHRoZSBzdHVkZW50cyBhbmQgdGhlaXIgR1BBcw0KYGBge3J9DQpjb3IudGVzdCh0aGVzaXMkQWdlLCB0aGVzaXMkR1BBMSkNCmBgYA0KDQpUaGUgY29ycmVsYXRpb24gYmV0d2VlbiBBZ2UgYW5kIFNlbGYgRXN0ZWVtIHdhcyBzdGF0aXN0aWNhbGx5IHNpZ25pZmljYW50LCAqciooNDApID0gLjA0LCAqbnMqLg0KDQoNCk5leHQsIHRoaXMgaXMgcnVub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