4. A large corporation requires that its employees attend a 1-day sexual harassm
ID: 3224959 • Letter: 4
Question
4. A large corporation requires that its employees attend a 1-day sexual harassment sem. inar. The Director of Human Resources of this corporation would like to determine 144 whether or not the information presented in this seminar is retained over a long pe- riod of time. To this end, a random sample of 40 employees is selected from recently hired employees who are scheduled to take this seminar. Each of the employees in this sample completes a test of knowledge concerning sexual harassment and related legal issues immediately after the seminar, and then takes a similar test 6 months later. The scores are contained in the file http://www. UTDallas.edu/ ammann/stat3355scripts/harass 1.csv Does that data indicate at the 5% level of significance that the mean score has changed after 6 months? Construct a 95% confidence interval for the difference between the meanExplanation / Answer
The R code is below.
# Read the course csv file into course dataframe
course <- read.csv("course.csv")
head(course)
# Conduct matched pairs t-test
# Null Hypothesis H0: There is no change in the mean score, that is the difference in mean score is 0
# Alternative Hypothesis H0: There is no change in the mean score, that is the difference in mean score is not 0
# Calculate the difference of test score
d <- course$Test1 - course$Test2
# Calculate the mean of the difference
mean.d <- mean(d)
# Calculate the standard deviation of the difference
sd.d <- sd(d)
# Standard error
n <- 40
se.d <- sd.d/sqrt(n)
# Degree of freedom
df <- n-1
# t-stat
t <- mean.d/se.d
# p-value
p <- pt(t,df)
# For two-tail test p = 2*p
p <- p*2
p
# Z-value for 95 % confidence interval is 1.96
z <- 1.96
# Lower limit of 95% confidence interval
ll <- mean.d - z*se.d
# Upper limit of 95% confidence interval
ul <- mean.d + z*se.d
list(ll,ul)
On riunning the R code, we get p = 0.3972458. As this value is greater than significance level, 0.05 , we fail to reject the null hypothesis and conclude that data does not indicate that the mean score has changed after 6 months.
95% confidence level of the difference in the mean score is (-6.661872, 2.611872)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.