In: Statistics and Probability
Project
Scenario:
You are a journalist for a hometown newspaper. You
have received a number of phone calls and emails from readers who
are concerned about how much they are paying for gasoline. One of
the readers wrote the following:
“I
think, on average, that a driver in our town pays more for a gallon
of regular
gasoline than a driver in other towns in our state.”
Your editor asks you to investigate the gasoline
prices of four towns (similar in size to your town, town B) and
write a short article about your findings. You have gathered some
data, shown in Table 1 below. The data represents the price paid
for one gallon of regular gasoline from a random sample of gas
stations in each of the four towns.
Table 1- The retail price for one gallon of
regular gasoline at 10 randomly selected stations in four towns as
of September 1, 2017.
Town A
Town B
Town C
Town D
2.73
2.75
2.72
2.79
2.71
2.71
2.71
2.71
2.68
2.72
2.69
2.73
2.68
2.74
2.77
2.72
2.71
2.77
2.71
2.75
2.72
2.78
2.72
2.78
2.71
2.75
2.74
2.71
2.74
2.79
2.76
2.78
2.71
2.80
2.71
2.72
2.69
2.75
2.75
2.74
Writing the
Article:
- Now that you have gathered and analyzed your data,
you are ready to write your article for the
newspaper. Please be sure to make it a minimum of one full
page in length, 12 pt. Times New Roman font, double-spaced, with
1-inch margins all around.
- You are to include at least 1 graph that best
represents your data analysis, your original table of data, and
reference to at least 3 of the questions noted above. Your article
is to be well-written and free from spelling and grammatical
mistakes. Appropriate citations should be included if you are
referencing researched data or comments made by others in your
article. Please try to make your article interesting and creative,
complete with an appropriate story headline.
Your editor asks you to investigate the gasoline prices of four towns (similar in size to your town, town B) and write a short article about your findings. You have gathered some data, shown in Table 1 below. The data represents the price paid for one gallon of regular gasoline from a random sample of gas stations in each of the four towns.
Here, first we simply draw bar graph.
In above graph when we compare prices, then first station of all four towns A,B,C,D is compared with each other. Interpretations from this graph improper for generalizing price comparison.
So, we draw box-plot. One can easily compare the prices on Y-axis of all the four towns. Box-plot shows 5-number summary for each town and thus helpful in comparison. Box-plot better displays the data. (It shows the 1st and 3rd quartile, median values, the maximum and minimum value. The dark black line represents the middle (median) value of particular town. )
Town A | Town B | Town C | Town D | |
2.73 | 2.75 | 2.72 | 2.79 | |
2.71 | 2.71 | 2.71 | 2.71 | |
2.68 | 2.72 | 2.69 | 2.73 | |
2.68 | 2.74 | 2.77 | 2.72 | |
2.71 | 2.77 | 2.71 | 2.75 | |
2.72 | 2.78 | 2.72 | 2.78 | |
2.71 | 2.75 | 2.74 | 2.71 | |
2.74 | 2.79 | 2.76 | 2.78 | |
2.71 | 2.8 | 2.71 | 2.72 | |
2.69 | 2.75 | 2.75 | 2.74 | |
Average | 2.708 | 2.756 | 2.728 | 2.743 |
Yes,it does appear that the “average” price for a gallon of gas in your town, Town B, is higher than the other cities | ||||
Range | 0.06 | 0.09 | 0.08 | 0.08 |
Variance | 0.0004 | 0.00085 | 0.00066 | 0.00093 |
Standard deviation | 0.01989 | 0.02914 | 0.02573 | 0.03057 |
Z-Scores(for Town B)=(value-meanofvalues)/standard deviationof values |
-0.206 |
-1.579 |
-1.236 |
-0.549 |
0.481 |
0.824 |
-0.206 |
1.167 |
1.510 |
-0.206 |
All gas prices lie between -1.6 to +1.6. |
There seems no unusual value |
5-number summary for Town B | number | |
minimum | 2.71 | 0 |
firstQuartile | 2.7425 | 1 |
median | 2.75 | 2 |
thirdQuartile | 2.7775 | 3 |
maximum | 2.8 | 4 |
Use EXCEL command quartile(array,number) array remains same=values of Town B | ||
Town A | Town B | Town C | Town D |
Average | 2.708 | 2.756 | 2.728 | 2.743 |
It is clear from above averages that the “average” price for a gallon of gasoline more in Town B than in other towns.
The reasons as to why the price of gasoline varies from town to town may be: taxes on gasoline, fuel blends, pipelines that carry gasoline may differ from town to town which affect the prices.
R-commands to draw boxplot:
d=scan("clipboard") ## data of prices of four towns
D=matrix(d,nrow=10,ncol=4,byrow=TRUE)
D
labels=c("Town A","Town B","Town C","Town D")
par(mfrow=c(1,4))
for (i in 1:4)
{
boxplot(D[,i],main="Boxplot",sub=labels[i],ylim=c(2.67,2.82))
}