In: Statistics and Probability
The following data set represents Heather’s average monthly charges ( in $) for cable TV for the past 24 months 105 125 110 98 102 115 110 123 118 101 95 128 110 105 122 107 118 107 117 125 116 110 101 107 A) Construct a Stemplot. B) Construct a frequency distribution , class width of 10, and a lower limit of 95 for class 1. C) Construct a histogram. Comment on the shape of the distribution based on the histogram
In order to solve this question we use R software.
R codes and output:
>x=c(105,125,110,98,102,115,110,123,118,101,95,128,110,105,122,107,118,107,117,125,116,110,101,107)
> stem(x)
The decimal point is 1 digit(s) to the right of the |
9 | 58
10 | 11255777
11 | 000056788
12 | 23558
> y=cut(x,breaks = c(94,105,115,125,135))
> transform(table(y))
y Freq
1 (94,105] 7
2 (105,115] 8
3 (115,125] 8
4 (125,135] 1
> hist(x,breaks = c(95,105,115,125,135))
A) Stem plot
The decimal point is 1 digit(s) to the right of the |
9 | 58
10 | 11255777
11 | 000056788
12 | 23558
B)
Frequency distribution:
y Freq
1 (94,105] 7 [Lower limit of this class is showing 94 but actually it is 95, because R does not include lower limit in that class]
2 (105,115] 8
3 (115,125] 8
4 (125,135] 1
C)
Histogram :