In: Math
SHOW ALL WORK
1) The following is a list of prices (in dollars) of birthday cards found in various drug stores:
2.45 |
1.20 |
0.85 |
1.33 |
2.25 |
2.25 |
2.09 |
2.99 |
1.00 |
0.88 |
1.42 |
2.36 |
2.15 |
2.85 |
1.52 |
1.99 |
2.38 |
0.85 |
2.22 |
2.75 |
I have used R for determining the results. First I shall put the results, after that, I shall attach the R code. So let's start.
a.
mean = 1.889
median = 2.120
mode = 2.215
range = [0.85, 2.99]
Variance = 0.4870
standard deviation = 0.69791
b. Histogram of the distribution
The entire construction will be elaborated in the code section.
Comment on the shape:
For this, I have calculated another plot, which is the kernel density plot. Here from that plot, I am seeing that the distribution is bimodal, though the global mode exists at the mentioned point. Now the distribution is NOT symmetric, Rather it is slightly negatively skewed.
Code Section:
# Data
install.packages("goeveg")
library(goeveg)
x =
c(2.45,2.25,1.42,1.99,1.20,2.09,2.36,2.38,0.85,2.99,2.15,0.85,1.33,1.00,2.85,2.22,2.25,0.88,1.52,2.75)
min(x)
max(x)
# Adjust the breaks accordingly
# Analysis
length(x)
range(x)
byvar = (max(x)-min(x)+1)/10
breaks = seq(0.80,3.00,by = byvar)
# Frequency Distribution
x.cut = cut(x,breaks,right = F)
x.freq = cbind(table(x.cut))
# Various summary measures
summary(x)
sd(x)
cv(x)
mean(x)
var(x)
# OUTPUTs
x.freq
# Histogram
hist = hist(x,breaks = breaks)
# Kernel density plot
plot(density(x))
Hope this answer has helped you. Do let me know in the comment section if you have any question.
Thanks !!