In: Statistics and Probability
Log onto website where you can observe your service bill for the last 12 months (electric bill, cell phone bill, water bill, etc.). If you do NOT feel comfortable sharing this data, you can make up values. In excel, list the values of your bill for the last 12 months on one column. Find the sample mean and sample standard deviation of your data. Pick three bills from the last 12 months and change the values into z-scores. What does the z-score tell you about that particular month? Analysis Between what two values would be considered a normal bill? Remember, being within 2 Standard Deviations is considered normal. Are any of your bills in the last 12 months unusual? Very unusual? Are there times when you would accept an "unusual" bill? Explain.
Book <- read_excel("Book.xlsx")
> d=Book
> head(d)
# A tibble: 6 x 4
Month `Elctricity bill` `Cell phone bill` `Water bill`
<chr> <dbl> <dbl> <dbl>
1 jan 880 585 1000
2 feb 990 600 1290
3 mar 1020 677 1760
4 apr 1045 620 1280
5 may 1360 700 1085
6 jun 1010 680 856
> mean=c()
> mean[1]=mean(d$`Elctricity bill`)
> mean[2]=mean(d$`Cell phone bill`)
> mean[3]=mean(d$`Water bill`)
> sd=c()
> sd[1]=sd(d$`Elctricity bill`)
> sd[2]=sd(d$`Cell phone bill`)
> sd[3]=sd(d$`Water bill`)
> zscore=data.frame((d$`Elctricity bill`-mean[1])/sd[1],(d$`Cell
phone bill`-mean[2])/sd[2],(d$`Water bill`-mean[3])/sd[3])
> as.matrix(zscore)
X.d..Elctricity.bill....mean.1...sd.1.
X.d..Cell.phone.bill....mean.2...sd.2.
X.d..Water.bill....mean.3...sd.3.
[1,] -0.94968674 -0.45807693 -0.5560045
[2,] -0.08811526 -0.21485024 0.2191941
[3,] 0.14685877 1.03371343 1.4755504
[4,] 0.34267047 0.10945201 0.1924631
[5,] 2.80989789 1.40666101 -0.3287911
[6,] 0.06853409 1.08235876 -0.9409307
[7,] -0.08811526 -0.37700137 -0.9115266
[8,] -0.16643994 -0.53915249 2.0582858
[9,] 0.06853409 0.92020764 0.9035073
[10,] -0.16643994 -0.74994896 -0.6094665
[11,] -1.10633610 -2.16066375 -0.9115266
[12,] -0.87136206 -0.05269912 -0.5907548
Yes there is unusual electricity bill in 5th month since its May so temperature is quite high so people use electric fans,coolers,ac hence it may be high
There is unusual phone bill in November and unusual water bill in august