In: Statistics and Probability
A new magazine, Cycling n’ Running NZ is about to be published. The magazines’ publishers are unsure whether readers of this magazine would be more interested in articles on cycling or articles on running. Accordingly, a study was conducted to find out how interested readers of this magazine would be in articles on either of these topics. The variables to use in answering this question are Cycling and Running. Potential interest in both topics was measured on a five-point semantic differential scale that was anchored 1=Very Uninterested to 5=Very Interested. Is there a difference in the extent of preference for articles about cycling compared to articles about running?
row 1(going down): cycling
Row 2 (going down): running
4 2
3 3
4 1
5 2
5 3
5 1
5 2
3 2
3 2
3 3
3 3
3 4
3 2
2 4
2 2
2 3
2 3
2 4
2 4
2 4
1 4
1 1
1 3
1 2
1 4
1 3
1 2
1 2
1 3
3 1
5 1
4 2
4 2
3 4
2 2
1 4
2 2
5 1
5 2
3 3
3 3
2 2
5 2
2 4
4 1
5 2
4 3
2 1
1 4
4 2
3 4
4 2
1 3
4 2
3 3
2 2
2 5
2 3
4 4
1 2
3 3
3 2
3 4
4 5
3 3
5 1
4 3
4 2
3 3
2 1
5 1
2 4
5 2
3 2
2 1
5 4
3 2
1 3
3 2
3 3
2 2
2 3
4 3
2 4
2 2
4 1
3 5
1 3
5 1
5 3
5 1
4 4
1 3
3 3
1 2
1 4
2 5
2 4
5 2
5 1
2 3
4 1
3 2
3 3
5 1
3 3
2 4
3 2
3 3
2 4
1 4
3 5
5 2
3 1
4 3
4 2
4 2
4 3
2 3
3 4
5 2
3 4
5 1
3 2
5 1
> library(readxl)
> Book1 <- read_excel("Book1.xlsx")
> head(Book1)
# A tibble: 6 x 2
cycling running
<dbl> <dbl>
1 4 2
2 3 3
3 4 1
4 5 2
5 5 3
6 5 1
> #H0:mu_cycling=mu_running vs H1:mu_cycling≠mu_running where
mu_cycling=mean of cycling data and mu_running= mean of running
data
> t1=t.test(Book1$cycling,Book1$running);t1
Welch Two Sample t-test
data: Book1$cycling and Book1$running
t = 2.4911, df = 240.36, p-value = 0.01341
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
0.0803403 0.6876597
sample estimates:
mean of x mean of y
3.008 2.624
> ifelse(t1$p.value<0.05,"Reject H0 and conclude that
there is a significant difference in the extent of preference for
articles about cycling compared to articles about running","fail to
reject H0 and conclude that there is no significant difference in
the extent of preference for articles about cycling compared to
articles about running")
[1] "Reject H0 and conclude that there is a significant
difference in the extent of preference for articles about cycling
compared to articles about running"
>