Graph using the scatter plot diagram and interpret the following data.
71-80. The owner of a chain of fruit shake stores would like to study the correlation between atmospheric temperature and sales during the summer season. Suppose a random sample of 12 days is selected with the results given as follows:
Day
Temperature(F0)
(x)
Total Sales (Units)
(y)
1
79
147
2
76
143
3
78
147
4
84
168
5
90
206
6
83
155
7
93
192
8
94
211
9
97
209
10
85
187
11
88
200
12
82
150
A scatter diagram for the data given is obtained from entering the following commands in
> x=c(79,76,78,84,90,83,93,94,97,85,88,82)
> y=c(147,143,147,168,206,155,192,211,209,187,200,150)
> plot(x,y,main="Scatter plot of sales against temperature")
These commands produces the scatter diagram below.
Clearly, the values of sales increases with increase in temperature. We can therefore predict that there is a strong positive correlation between sales and temperature. To verify this, we need to determine the correlation coefficient .
To obtain the value of the correlation coefficient, we enter the following commands in
> x=c(79,76,78,84,90,83,93,94,97,85,88,82)
> y=c(147,143,147,168,206,155,192,211,209,187,200,150)
> cor(x,y)
[1] 0.9270573
The value of shows that there is a strong positive correlation between sales and temperature.
Comments