Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Jonah Shaukat jss3726

Lab 2pm Tuesday


3)
a) > boxplot(jss3726$extraversion~jss3726$volunteer, main = "Extraversion by Volunteer
Status", ylab = "Extraversion", xlab = "Volunteer Status")

b)
> mean(jss3726[jss3726$volunteer == "yes",]$extraversion)
[1] 12.9397
> mean(jss3726[jss3726$volunteer == "no",]$extraversion)
[1] 11.96238

c) H0: yes = no HA: yes no


> t.test(jss3726$extraversion ~ jss3726$volunteer)

Welch Two Sample t-test

data: jss3726$extraversion by jss3726$volunteer


t = -4.6907, df = 1270.1, p-value = 3.018e-06
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-1.3860765 -0.5685632
sample estimates:
mean in group no mean in group yes
11.96238 12.93970

Since the p value is less than the level of confidence 0.05 we can reject the null hypothesis;
theres evidence that the mean extraversion score for volunteers is significantly different than
that of non-volunteers.

You might also like