You are on page 1of 2

Chaw Su Thein Aung

Roll – 27
Assignment –(II)
No 2. Television Viewers A television executive selects
10 television shows and compares the average number
of viewers the show had last year with the average
number of viewers this year. The data (in millions) are
shown. Describe the relationship.
Viewers last year 26.6 , 17.85, 20.3 , 16.8, 20.8
Viewers this year 28.9, 19.2, 26.4 , 13.7, 20.2
Viewers last year 16.7, 19.1, 18.19,16.0 ,15.8
Viewers this year 18.8, 25.0, 21.0, 16.8, 15.3

Test the significance of r at 𝛼 = 0.05, using the P-value


method.

x<-c (26.6, 17.85, 20.3, 16.8, 20.8, 16.7, 19.1, 18.9, 16.0, 15.8)
> y<-c (28.9, 19.2, 26.4, 13.7, 20.2, 18.8, 25.0, 21.0, 16.8, 15.3)
> plot (x, y ,main="Scatter plot", y lab = "Viewers this year", x lab = "Viewers last years")
> cor (x, y, method = "pearson")
[1] 0.8390739
> cor.test (x, y, method="pearson")

Pearson's product-moment correlation

data: x and y
t = 4.3625, df = 8, p-value = 0.002405
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.4440300 0.9610007
sample estimates:
cor
0.8390739

>

You might also like