Julia Deutsch _ HW_ Week 9 (1)

.pdf

School

New York University *

*We aren’t endorsed by this school

Course

1305

Subject

Statistics

Date

Jan 9, 2024

Type

pdf

Pages

6

Uploaded by ProfessorTeam17161

Julia Deutsch HW: Week 9 STATISTICS AND DATA ANALYSIS HOMEWORK EXERCISES 19. A heating contractor sends a repair person to homes in response to calls about heating problems. The contractor would like to have a way to estimate how long the customer will have to wait before the repair person can begin work. Data on the number of minutes of waiting time (Wait.Tim) and the backlog of previous calls waiting for service (Backlog) were obtained. The data file is available on the class website, under the name WAITTIMEBACKLOG. (c) Consider a regression for a model with the base-10 logarithm of Wait.Tim as a response and Backlog as a predictor. Run a linear regression in R for this model. Does this model appear better than the one without taking the logarithm of the Wait Time? Help: Calculate the 10 based log of the Wait Time using the following R command: Logtime=log10(Wait.Tim) Then run a regression using Logtime as the response. IN R: attach(WAITTIMEBACKLOG_1_) #saves data to memory for easier reference mod<- lm(`Wait Tim` ~ Backlog) #builds regression summary(mod) #regression output Logtime=log10(`Wait Tim`) mod2<- lm(Logtime ~ Backlog) #builds regression summary(mod2) #regression output
Answer: The regression model with the transformed wait time seems better than without the transformed wait time since the adjusted r-squared increased from 0.2413 to 0.2804 (d) Calculate the predicted value for the log of the Wait Time when the backlog is 6 Log10(wait time) = 1.47008 + 0.194(6) Answer: The predicted logarithm of Wait Time when the backlog is 6 is approximately 2.63408
(e) Convert your answer to question (d) to a predicted value for the Wait Time when the backlog is 6. Help: You need to take the 10 based exponential of the prediction you received in part (d) Log( a ) Y = X Y = a x Wait Time = 10 2.4608 Answer: Wait Time = 430.6059 ≈ 431 Minutes 20. You will need the data file ”sales” for completing this exercise. The file has the following columns that are relevant to this exercise: SalesPerSF: Sales per square foot of stores operated by a retail chain, Income: the median household income in the surrounding community (dollars), Population000: and the size of the community (in thousands). 6 Market: This is a qualitative variable. There are 3 types of geographic locations: urban, suburban, and rural. Two dummy variables have been set up, UrbanDummy and SuburbanDummy. Rural is selected as the base level. Disregard the other columns in the file. (a) Run a regression using SalesPerSF as the dependent variable, and Income, Population000, and the two dummy variables as predictors. Which of the coefficients are significantly different from zero? IN R: attach(sales) #saves data to memory for easier reference mod<- lm(SalesPerSF ~ Income + Population000 + UrbanDummy + SuburbanDummy) #builds regression summary(mod) #regression output
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help