Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: Server Tips When do servers receive the largest tips? Over several weeks, a student from a recent Stat 272 class ran a small

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Part 1: Server Tips When do servers receive the largest tips? Over several weeks, a student from a recent Stat 272 class ran a small study of 417 customers who ate at one Northeld restaurant where she worked as a server. The student was interested in learning under what conditions a server can expect the largest tips for example, at dinner time or late at night? From younger or older patrons? During the shifts she was working, the student observed customers as they went about their meals and collected data on each customer. Here is a description of the variables we will consider, followed by the rst 6 rows of the dataset: - Bill : dollar amount of the bill . Tip : dollar amount of the tip - Ticht : percentage of the bill represented by the tip - Meal : time of day (Lunch, Dinner, Late Night) - Payment : how bill was paid (Credit, Cash, Credit with Cash tip) - Age : age of customer (Middle Aged, Senior Citizen, Young Adult) - Alcohol : No(D)/Yes(1) if Alcohol was part of the bill - FriSat : indicator of Friday/Saturday (1) vs Sundavahnrsday (0) head(tips) ## Bill Tip Ticht Meal Payment Age Alcohol FriSat ## 1 34.50 4.00 11.59420 Dinner Credit Middle Yes 0 ## 2 27.50 5.00 18.18182 Dinner Credit SenCit No 0 ## 3 16.16 2.50 15.47030 Dinner Credit SenCit Yes 0 ## 4 21.96 5.04 22.95082 Dinner Cash Yadult Yes 0 ## 5 49.50 10.50 21.21212 Dinner Cash Yadult Yes 0 ## 6 29.94 5.00 16.70007 Dinner Credit/CashTip SenCit Yes 0 o 150- 100- ' ' a I 9 50- O- NO YES Alcohol favstats(-Bill|A1cohol,a'n=tips) ## Alcohol min Q1 median QB max mean ed 11 missing ## 1 No 1.70 15.065 26.540 37.115 102.07 28.49152 17.05153 283 0 ## 2 Yes 7.83 26.625 34.995 46.820 164.13 38.69970 20.83116 134 0 modell |t|) ## (Intercept) 18.85395 0. 58230 32.378 % filter (BillItl) ## (Intercept) 19.28891 0. 61943 31. 140 Itl) ## (Intercept) 18.97579 0. 70408 26 . 951 > 1 # # ## Residual standard error: 6.073 on 411 degrees of freedom ## Multiple R-squared: 0.04561, Adjusted R-squared: 0. 04096 ## F-statistic: 9.82 on 2 and 411 DF, p-value: 6.821e-05 confint (model4) ## 2.5 % 97.5 % ## (Intercept) 17. 5917436 20.35983731 ## Bill -0. 1089572 -0. 04020477 ## FriSat -0. 6159894 1. 73570017 11. [5 points] Sketch the model we are fitting in model4. Label intercepts and slopes with estimated values determined by model coefficients. 712. [3 points] Interpret the coefficient for FriSat in model4. 13. [3 points] Interpret the 95% confidence interval for Bill in context of model4. resid_panel (model4, plots="R") Residual Plot Q-Q Plot 20 - 20- 10 - Residuals 0+ Sample Quantiles -10 - 10 - -20 -20 14 16 18 -20 -10 10 20 Predicted Values Theoretical Quantiles Location-Scale Plot Residual-Leverage P 2.0 1.5 . 2.5- VI Standardized Residuals 1.0 -V. . Standardized Residuals 0.0- 0.5 -.. 2.5 - 1 8 0.0- Gook's distance contours 14 16 0.00 0.01 0.02 0.03 Predicted Values Leverage 14. [8 points] Comment on whether the assumptions of linear regression appear to be satisfied for mode14. Clearly state each assumptions, appeal to the appropriate plots, and cite specific characteristics you are considering for each assumptions.Part 2: High Peaks Fortysix mountains in the Adirondacks of upstate New York are known as the High Peaks with elevations near 01' above 41000 feet (aithough modern measurements show a couple of the peaks are actually slightly under 4000 feet). A goal for hikers in the region is to become a \"46e1'\" by sealing each of these peaks. This (lataset give information about the hiking trails up each of these peaks: - Peak : Name of the mountain . Elevation : Elevation at the highest point (in feet) . Difficulty : Rating of difculty of the hike: 1 (easy) to 7 (most difcult) - Ascent : Vertical ascent. (in feet) - Length : Length of hike (in miles) . Time : Expected trip time (in hours) ## Peak Elevation Difficulty Ascent Length Time ## 1 Mt. Marcy 5344 5 3166 14.8 10.0 ## 2 Algonquin Peak 5114 5 2936 9.6 9.0 ## 3 Mt. Haystack 4960 7 3570 17.8 12.0 ## 4 Mt. Skylight 4926 7 4265 17.9 15.0 ## 5 Whiteface Mtn. 4867 4 2535 10.4 8.5 ## 6 Dix Mtn. 4857 5 2800 13.2 10.0 l\"- LO 0 0 comic oco LD 0 co 0 on an |t/) ## (Intercept) 2. 04817 0. 80371 2. 548 0. 0144 * ## Length 0 . 68427 0. 06162 11. 105 2.39e-14 *** # # - -- ## Signif. codes: 0 '* **' 0. 001 '**' 0.01 '*' 0.05 * . ' 0.1 > > 1 # # ## Residual standard error: 1.449 on 44 degrees of freedom ## Multiple R-squared: 0.737, Adjusted R-squared: 0.7311 ## F-statistic: 123.3 on 1 and 44 DF, p-value: 2.39e-14 16. [3 points] In modi we fit a model of Time as a function of Length. Interpret R2 in the context of the problem. 10predict (modi , data . frame (Length=11. 4) , interval="prediction") # # fit 1wr upr ## 1 9. 848896 6. 892943 12. 80485 predict (mod1 , data . frame (Length=11 . 4) , interval="confidence") ## fit 1wr upr ## 1 9. 848896 9. 394245 10.30355 17. [2 points] Whiteface Mountain (NY) is one of the Mountains in this dataset. But Mt Whiteface (NH) is not. The length of the hike to the summit of Mt Whiteface is 11.4 miles. Provide a point estimate and an appropriate 95% interval for how long this hike should take a NY hiker who travels to NH. (No interpretations needed.) mod2=1m (Time~Length+as . factor (Difficulty) , data=HighPeaks) #as. factor creates indicator variables summary (mod2) # # ## Call : ## 1m (formula = Time ~ Length + as . factor (Difficulty) , data = HighPeaks) ## ## Residuals: # # Min 1Q Median 3Q Max ## -3.3106 -0. 4945 -0. 1135 0. 4030 2. 6066 # # ## Coefficients: ## Estimate Std. Error t value Pr(>|t/) ## (Intercept) 3. 01229 1.27406 2.364 0. 02314 * ## Length 0. 41411 0. 08148 5. 082 9. 66e-06 *** ## as . factor (Difficulty)3 -0. 65950 1 . 72991 -0. 381 0. 70510 ## as . factor (Difficulty)4 1.59120 1. 33851 1. 189 0. 24171 ## as . factor (Difficulty)5 1.91152 1. 38842 1.377 0. 17644 ## as . factor (Difficulty)6 2.46736 1. 43754 1.716 0. 09403 ## as . factor (Difficulty)7 4.92721 1. 62798 3. 027 0. 00437 * * # # --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 ' . ' 0.1 ' ' 1 ## ## Residual standard error: 1.213 on 39 degrees of freedom ## Multiple R-squared: 0.8368, Adjusted R-squared: 0.8117 ## F-statistic: 33.34 on 6 and 39 DF, p-value: 6.962e-14 1118. [4 points] Next we add difficulty rating as indicator variables. Explain what we mean by indicator variables and the specifics of how they are included in mod2. 19. [3 points] Interpret the coefficient for Diff7 in mod2. 20. [3 points] Interpret the coefficient for Length in mod2 in context. 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Algebra Matrix Theory Differential Algebraic Equations And Control Theory

Authors: Peter Benner, Matthias Bollhöfer, Daniel Kressner, Christian Mehl, Tatjana Stykel

1st Edition

3319152602, 9783319152608

More Books

Students also viewed these Mathematics questions

Question

Verify that the Ep expression (17.58) holds for 1, 3-butadiene.

Answered: 1 week ago