Sei sulla pagina 1di 12

# Homework # 6

## 206513 Applied Quantitative Sciences in Industrial Engineering

Pornpunsa Wuttisanwattana
1. Textbok 16.2 -- From 16.1 Jolly Donuts has been in business for 10 years. The manager needs to forecast weekly sales of donuts to determine how much flour, sugar, oil, and other ingredients to purchase. The company has the following records on the number of dozens of donuts sold in each of the previous 16 weeks (See the file donuts.xls) Week Sales
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 386 379 408 405 403 395 399 418 381 389 410 393 378 399 390 408

396.31

Jelly Donut

## Linear Regression for Jelly Donut 8 10 12

14

16

From the scatter plot, the trend is very close to horizontal and the R2 is very low which means the trend line can explain the sales amount close to zero percent. So, he level model should be applied to forecast the dozens of donuts sale in week 16. Level Ft = A = 396.31 Dozen 396. Model best forecast for the sales of week 16 is So, the Dozen 31 16.6 -( See the instructions preceading Exercise 16.1) The Surgeon General's office has continually increased its adverstiseing campaign over the years to warn the public about the dangers of tobacco. To help estimate medical expenditures on lung cancer and tobacco realted diseases, the Surgeon General wants to predict the number of tobacco users in the United States on an annual basis. The Surgeon General estimates that each tobacco user pays an average of about \$125 per year in tobacco sales tax. Note the following record of the tobacco sales-tax revenues ( n \$ millions) for the past 10 years.(see the file surgeon.xls)

Year Taxes

1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 0 1 2 3 4 5 6 7 8 9 4630 4630 4412 4092 3943 3534 3509 3141 3097 3030

Surgoen

## 5000 4500 4000 3500 3000 1 2 3 4 5 6 7 8 9 10

From the scatter plot, the trend line is obviously decreasing with the 97% of the taxes can be explained by this line. So, the trend model should be applied to forcast the taxes income of 1994

From

Ft

= = =

## A+ Bt 4719.4 - 203.9t 2680.4 Million \$

3.)16.14 For theproblem of Jolly Donuts, Suppose the forecast for a level model is 400 dozen donuts for each of the same 15 weeks as in 16.2 (Note Change "10 wks to 15 wks and use the file donuts.xls and excel to compute the performance measures using the formulas developed in class. For part (d) use your forcast for week 15
Week 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Sales 386 379 408 405 403 395 399 418 381 389 410 393 378 399 390 408 Forecast 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 Error -14 -21 8 5 3 -5 -1 18 -19 -11 10 -7 -22 -1 -10 8 Abs. Error 14 21 8 5 3 5 1 18 19 11 10 7 22 1 10 8 % Error 3.63 5.54 1.96 1.23 0.74 1.27 0.25 4.31 4.99 2.83 2.44 1.78 5.82 0.25 2.56 1.96 Error^2 196 441 64 25 9 25 1 324 361 121 100 49 484 1 100 64

TOTALS

## 2365 =SQRT(average(Error^2) 12.16 RSME

(a) The MAE = total/16 = 163/16 = 10.18. This means that, on average, forecasts are expected to be within 10.18 of the actual number of subscribers. (b) The MPAE = total/16 = 41.56/16 = 2.59. This means that, on average,forecasts are expected to be within 2.59 percent of the actual number of donuts sold. (c) The RMSE = total/16 = 2365/16 = 12.15. This means that the square root of the average of the squared errors between the forecasts and the actual number of subscribers is 12.15. This provides an estimate of the standard deviation in the errors. d. Find 98% confidence interval for the final forecast. Is the actual sale of donuts within this interval? 98% Confidence Interval = 0.02 F15 Z *RMSE F15 Norminv(1 - /2, 0, 1) * RMSE 400 28.28 Ans Therefore, week 15 actual sale of 408 mill bath is in the 98% confidence interval.

4.) 16.28 For the problem of the Surgeon General in 16.6, use your computer together with all of the historical data to develop the best level and trend models you can with the method of exponential snoothing. Which of these two models would you select to use for the future forecast? Explain( Use the file surgeon.dat and STORM )

Comapring between Level and Trend Model Model MAE Level 233.83 Trend 106.5 Ans

## RMSE 302.73 137.05

On the basis of less error, the better model, in this case the Trend model is chosen for forecasting

5. An official of a Thai boxing area would like to develop a model to forecast the amount of money bet ( in millions of baht) based on attendance. A random sample of 15 days is selected with the following results:

Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Y X Amount Bet Attendance (000,000 (000S) Baht) 14.5 21.2 11.6 31.7 46.8 31.4 40 21 16.3 32.1 27.6 34.8 29.3 19.2 16.3 20 0.7 0.83 0.62 1.1 1.27 1.02 1.15 0.8 0.71 1.04 0.97 1.13 0.91 0.68 0.63

Use the file Boxing.dat and STORM to answer the following questions (a) Find estimates of the coefficients of a linear regression model Ans b0 =0.372954, b1 = 0.0202278 BET = 0.372954 + 0.0202278 ATTENDANCE

(b) Interpret the meaning of the slope b1 in the context of this problem Ans b1 is 0.0202 that means if attendance is increased for 1000S, the amount bet will increase for 20.2 Million Baht (c.)Predict the amount bet for a day on which attendence is 20,000 From Storm result, Bet = 0.37 + 0.02 Attendance = 0.37 + 0.02 *20 Ans = 0.78 or 777510 THB (d) What is the value of the coefficient of determination and what does this value mean in the context of this problem? Ans Coefficient of Determination , R2 = 0.9473 or 94.73% of the amount bet is explained by the attendance.

(e) Set up a 95% Confidence Interval estimate of the amount of money bet on a specific day when attendance is 20,000 Ans It is 95% confidence that the attendence of 20,000S will provide the amount bet between 664,100 - 891,000 THB at the best estimated of 777,500 THB

(f) At the 0.05 significance level, is there evidence of a linear relationship between the amount of money bet and attendance? Hypotheses H0 : 1 = 0 H1 : 1 0

Ans

Decision Rule > P-value : Reject H0 , otherwise Accept H0 = 0.05 while P-value = 0 , Therefore, it can be concluded that there is a linear relation between amount bet and attendance

## (g) Set up 95% confidence interval of the true slope. b1 b1 b1 b1

0.05

Ans

e t*Sb1 TINV(,df)*Sb1 TINV(0.05,15-2)* 0 0.02 0 It is 95% confidence that the true slope 1 will be between

0.02

and

0.02308

(h) Discuss why you should not predict the amount bet on a day in which the attendance exceeds 46,800 or is below 11,600 Ans Becase the data of attendance (X) in between 11,600S - 46,800S.

in millions of

his problem?

dance.

0 - 891,000

bet and

or is below

6. The owner of a Toyota dealership wants to estimate the value ( 00,000 of baht) of a used Mercedes Benz (Y) based, possibly, on the number of kilometers driven (X1) and the age of the car in years(X2) . Data were collected and three models whose outputs are given below were created. Which model would you choose for forecasting? Explain why you choose that model and explain why you did not choose the other two models. For the model you selected, write a brief report interpreting all of the important numbers in the report in the context of this problem

The best model should be follow : No. of Variables R2 Prediction Interval Range Model 1 2 0.89 Model 2 Model 3 1 1 0.88 0.87 No Information

From the available information, it can be concluded that Model#2 is the best for forcasting because of fewer variable and higher of coefficient of determination. Or we could say that Models2 can explain 88.08% of the the value ( 00,000 of baht) of a used Mercedes Benz with only one variable. Briefly Descript the Chosen Model Measurement R2 Value 0.88 Description There is 88.08% of the value ( 00,000 of baht) of a used Mercedes Benz (Y) is explained the age of the car in years(X2) . The total variation in the value ( 00,000 of baht) of a used Mercedes Benz (Y). The explained part of total variation The unexplained part of total variation Y intercept or the value of the value ( 00,000 of baht) of a used Mercedes Benz (Y) when the age of the car in years(X2) is zero. If the age of the car in years(X2) is increased 1 year, the value of the value of a used Mercedes Benz (Y) will be increased for82,142.9 Baht P-Value for ANOVA is used to test for how good of the coefficient of determination is. Whne > P-value, H0 is rejected. It can be concluded that R2 is good or the model can be used for forecasting.

b1

0.82

## P-Value for tTest

P-Value for t-Test is used to test for linear relation. Whne > Pvalue, H0 is rejected. It can be concluded that there is linear relation between the value ( 00,000 of baht) of a used Mercedes Benz (Y) and the age of the car in years(X2) .