Herbie has recently taken ownership of a Pizza Delivery Business. He has had a great deal of success in his other pizza ventures. Anyway, when he took over this business, the previous owner said this business was in serious trouble.
Here are some of his statements: “The ovens are old. This business is going downhill quickly. The complaints keep rolling in. My workers are worthless…Many are too slow in their jobs. The public keeps using old menu options to order, example: Meal Deal 1 should be Pepperoni, but the people still think it is pepperoni chocolate pizza. I’m never going to get the public trained correctly. One of my drivers got a speeding ticket the other day…he blamed my policies. The closest houses on the route are 10 minutes away and I know the furthest houses are 20 minutes away. I took that into consideration when I advertised pizza in 15 minutes or less.” Frankly, he was just majorly frustrated.
Are you struggling with your college assignments? Hire a professional writer to get expert help and ensure top-notch quality in your work.
Herbie knows a bit about statistics. He also knows that usually, the morale of the workers has more to do with the work environment. His motto is “to fix things, you have to find the issues first with data, and then fix the issues and never assume anything”. He wanted to use his knowledge to be a private investigator as to what is going on and make changes to help improve the business. Herbie’s policy is to have a pizza delivered hot & fresh in 15 minutes or less. On food safety, it requires the pizzas be 160 degrees or warmer. What will Herbie find?
The first thing Herbie did was to study the flow of his business. He has mapped out the process:
To install the BlumanStats Package, the following commands must be executed in R:
install.packages(“devtools”)
library(“devtools”)
devtools::install_github(“kspittlerbrown/BlumanStats/BlumanStats”)
library(“BlumanStats”)
Herbie’s Pizzeria…Seriously, the best pizza around!
Scenario: Herbie has recently taken ownership of a Pizza Delivery Business. He has had a great deal of success in his other pizza ventures. Anyway, when he took over this business, the previous owner said this business was in serious trouble.
Here are some of his statements: “The ovens are old. This business is going downhill quickly. The complaints keep rolling in. My workers are worthless…Many are too slow in their jobs. The public keeps using old menu options to order, example: Meal Deal 1 should be Pepperoni, but the people still think it is pepperoni chocolate pizza. I’m never going to get the public trained correctly. One of my drivers got a speeding ticket the other day…he blamed my policies. The closest houses on the route are 10 minutes away and I know the furthest houses are 20 minutes away. I took that into consideration when I advertised pizza in 15 minutes or less.” Frankly, he was just majorly frustrated.
Herbie knows a bit about statistics. He also knows that usually, the morale of the workers has more to do with the work environment. His motto is “to fix things, you have to find the issues first with data, and then fix the issues and never assume anything”. He wanted to use his knowledge to be a private investigator as to what is going on and make changes to help improve the business. Herbie’s policy is to have a pizza delivered hot & fresh in 15 minutes or less. On food safety, it requires the pizzas be 160 degrees or warmer. What will Herbie find?
The first thing Herbie did was to study the flow of his business. He has mapped out the process:
Are you struggling with your college assignments? Hire a professional writer to get expert help and ensure top-notch quality in your work.
- Open my stat excel spreadsheet.
- Then, open the Herbie’s Pizza Data Set and save it somewhere so you can upload it.
- Import this data set into RStudio.
- Finally, install my R-Package into RStudio to complete the project with all commands that will work:
To install the BlumanStats Package, the following commands must be executed in R:
install.packages(“devtools”)
library(“devtools”)
devtools::install_github("kspittlerbrown/BlumanStats/BlumanStats")
library(“BlumanStats”)
Are you struggling with your college assignments? Hire a professional writer to get expert help and ensure top-notch quality in your work.
Now…let’s work on the project…
- After creating a flowchart, Herbie then created a survey that the customer completes. He’s interested in the thoughts of all his pizza delivery customers. It would take too long to survey them all. He randomly selects approximately 20 customers for 1 month. (He did make sure each house was only surveyed one time.) He gives them one free large pizza if they answer the question: “Are you satisfied with Herbie’s Pizza Business?” as the first question. Then, he asks 3 additional questions. Finally, he asks them if anything was wrong with their order, and if so, to state what was the issue so he can work to fix it. Now, he kept track of who took the survey because he plans on surveying them again four months after he makes changes. He gathered a total of 602 observations.
a. What type of survey process did he use? (Circle the correct answer.)
Simple Random Sample Cluster Sample Stratified Sample Systematic Sample
b. What is his Population that he is studying?
c. What is his sample that he surveyed?
2. Herbie sampled 602 people. In terms of the “Are you satisfied with Herbie’s Pizza?” question, he is wondering if he sampled enough people to have a 95% level of confidence in his survey with a margin of error of no more than 5%. How many does he need to sample to make sure he has this level of confidence with that level of accuracy? He is assuming that he has no prior information about .
- What value should he use for ?
- Why is this data set for satisfaction a proportion type of data (instead of average)?
- Hand calculate the minimum sample size needed using the sample size formula discussed in class (listed below). ***Round the value for critical value to 2 decimal places.
Based on the formula, what was the minimum people that Herbie could sample to have the accuracy listed above? (Round this answer to 2 decimal places instead of the whole number.)
- ***Now, try using the excel calculator that we use in class. How many should you sample? Round to 2 decimal places (and not to the whole number).
- Compare the answers in part b and c to each other. Was the answer in part b the EXACT same as in part c? If not, why?
- Now, how many people is the minimum number he needs to survey? (Now, you need to round according to the rules we discussed in class.)
***Now try it in R: Run the command below but replace the proper values in the code:
This command gives the sample size needed to estimate a population proportion with the given margin of error. All values must be listed as decimal values and NOT in percentages: (Requires BlumanStats Package) samp_size_prop(alpha,p-hat,E)
- What sample size did this command give you?
- Does R give the decimal value (not rounded), or does it round it for you?
- Does this sample size agree with part b, c, and e?
- Was 602 people a large enough sample size for Herbie to sample to conclude a reliable proportion of satisfied customers?
- In the data collected from the survey, you have data from one variable called: “Satisfied?” It is based on the question: Are you satisfied with Herbie’s Pizza? As you collected data, you recorded a “1” for YES, and a “0” for NO.
- Suppose the former boss said the probability that a customer is happy with his business is 0.5. (50%)…
- Your goal is to have at least 75% of the people happy with his business. So, you are hopeful that it is almost to that goal and not closer to the 50% listed by the former owner.
Are you struggling with your college assignments? Hire a professional writer to get expert help and ensure top-notch quality in your work.
Excel:
Hint: Open Excel – Highlight all your data (Click in cell A1. Then Shift Control Right arrow, then Shift Control Down)– INSERT TAB – PIVOT TABLE – CLICK OK –
- In the Pivot Table Fields chooser box (right under the SEARCH rectangle), click and drag the “Satisfied?” label down to the “Rows” box. You should now see a 0 & a 1 appear under a Row Labels Title near the top of the spreadsheet.
- Now, back in the box in the Pivot Table Fields chooser box (right under the SEARCH rectangle again near the top), click and drag the “Satisfied?” to the ∑ Values box.
- We want to choose the COUNT option. If it says, “Sum of Original Question” in the lower right box, then click on the down arrow next to it, and choose “Value Field Settings”. Choose the “Count”. Click OK.
Now Redo the steps in R: (If you get an error, then you may need to change the “Herbie_Pizza_Before” to the name you called your data set in R.
The following command will count all of the values in each group…satisfied or non-satisfied.
table(Data_set_name$variable_name)
How many observations do you have? length(data_set_name$variable_name)
The below command will count it (table command) and then divide by the total counts (length command), and then multiply by 100 to get the percent.
table(data_set_name$var_name)/length(data_set_name$var_name)*100
4. The R percentage of satisfied customers should match the Excel values? Upload a screenshot of your entire screen showing the code you ran and the output you got. (Shift, control, S…all pressed at the same time lets you select portion of your screen. Then, you can save that to your computer to upload.)
5. Herbie was shocked about the low satisfaction rate. The former owner suggested that he had data showing that the satisfaction rate was closer to about 0.5. (ie. 50% of the people were satisfied.) You decide to begin by using Binomial Distribution to answer some questions based on mean and probabilities. You are going to assume the 50% satisfaction rate is correct until you can prove that it has changed.
- This is a scenario involving Binomial Distribution. Why?
- Knowing we had 602 observations, and the former owner believed the probability of someone being satisfied with the business was 0.5. Find the EXPECTED VALUE for the number of satisfied customers. (Hint…Binomial Distribution)
- What is the standard deviation for this distribution as well? (Hint…Binomial Distribution)
- Using the mean (expected value) and standard deviation, use the range rule of thumb to determine if 133 satisfied customers is significantly low… () What is the range for the number usual/typical of satisfied customers?
- Is 133 unusual? If it is unusual, is it unusually low or unusually high? Why or why not?
- Under the assumption that 0.5 is the correct proportion, what is the probability that at most 133 of the 602 surveyed people would be happy with this pizza business?
Use the Excel Binomial Calculator. (Once you enter all of the information, right click in the probability box. Then select format cells. Choose Scientific Notation to see more of the value.)
- Try it in R – Binomial Distribution:
The dbinom command calculates the exact probability (using the probability density function of the binomial distribution). The cumulative probabilities are found using the pbinom command. The lower.tail=FALSE option specifies to R to find the probability corresponding to the values to the right of a given value.
- P(x = a): dbinom(x,n,p)
- P(x < a): pbinom(a-1,n,p)
- P(x : pbinom(a,n,p)
- P(x > a): pbinom(a,n,p,lower.tail=FALSE)
- P(x a): pbinom(a-1,n,p,lower.tail=FALSE)
So, find P(x 133) …
What format did R give the answer in? Scientific or decimal?
- Based on the probability found in part f & g, would at most 133 satisfied customers be an unusually low number of people happy with this business? (Use, the 0.05 rule of thumb dealing with probabilities to determine… If the probability is less than 0.05, then it is unusual). Why or why not?
- Under the assumption that 0.5 is the correct proportion, what is the probability that exactly 133 of the 602 surveyed people would be happy with this pizza business?
- Use the Binomial Calculator in Excel. You once again may need to change to scientific notation.
- Now try it in R. The dbinom(x,n,p) command gives you the EXACT probability of success. How did the value in R compare to Excel?
***Upload a screenshot of the command and answer in R.
- What might this mean if he believes that he had a 50% satisfaction rate, but we only observed a 22% satisfaction rate? Keep in mind the probability for at most 133 people being satisfied. Would we expect to see only 133 satisfied people if the 50% satisfaction is correct? (If the probability is less than 0.05, then you would not expect to see these results. It would be unusual.)
- Calculate a 95% confidence interval for the true population proportion of satisfied customers for Herbie’s business. Remember, this is driven using the current sample proportion of satisfied customers. It does NOT use the “in theory” proportions of satisfied customers. So yes, you must use the calculation.
Use the Excel Spreadsheet.
- Now, try it in R. Confidence Interval for a Population Proportion: (Requires BlumanStats Package). Replace the arguments in the parentheses with your values.
one_prop_int(num_successes, n, alpha)
This will return the following information: Confidence Level, Lower Bound, Upper Bound, Margin of Error, and the Sample Proportion. What did the R confidence interval return for each of those values?
- Interpret the confidence interval into non-technical language.
- Based on your confidence interval, do you believe the former owner’s assumptions are accurate with a 50% satisfaction rate when you got the business? Why or Why Not?
- After seeing the data, you believe the satisfaction rate is closer to 27%. You want to see if the true satisfaction rate is less than that. Perform a hypothesis test to see if the rate of satisfaction is less than 27%.
Use the Spreadsheet to do this test…Use the spreadsheet to answer the question on Canvas.
What is the Ho and H1? What is the test statistic? What is the p-value? Interpret this in easy to understand terms.
- Now let’s try it in R: Hypothesis Test for a One Population Proportion: (Requires BlumanStats Package)
one_pop_prop_test(x,n,po)
where:
- x: The number of successes
- n: The number of trials
- po: The hypothesized population proportion
Using the p-value from R Studio, would you also arrive at the same conclusion that you would have arrived at in part 0?
Upload the screenshot of the output.
Sample Answer:
Are you struggling with your college assignments? Hire a professional writer to get expert help and ensure top-notch quality in your work.