This preview shows pages 1–17. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Stat 665 (Spring 2011)
Kaizar Midterm Name
Sow/770M! There are three problems in. this test.
To receive credit or partial credit, please be sure to ShOW all your work. The exam is closed book / closed notes.
You may bring a single 8.5”x11” page of formulae to this exam.
A calculator is allowed a personal digital assistant or cellphone is not. The exam will last for 68 minutes. Good luck! Question 1 (21 points total)
Based on the Analysis Part I, answer the following.
(a) (6 points) \Vhat do you think the most reasonable sampling distribution for the number of orders using loyalty cards that Bob completed? Calculate the maximum
likelihood estirnate(s) of the pararneter(s) for this san'ipling distribution. Lil” “‘1: ﬂ 0PM OSlS carols Egéa Cmplblfae
ﬂu’V 1>O;SSM 944"» WWW (b) (2 points) Estimate the proportion of orders completed during the one—hour period that
were corrrpleted by Bob. A 0:
Tr: 217:; = 0.9:}? (c) 5 points) A statistics student who works at the store correctly calculated the following
95% Wald conﬁdence interval for the proportion of orders completed by Bob: (0.5055862, 0.8515567). Explain using language that the store owner could understand Why this interval is not
as good as a score—type or exacttype interval for showing that the two applicants have
dillerent check—out 51:)eeds. Wald beltrvwcﬂtI Govern? f9 usual smalllr “ll/um “Hal. Mimi/Mi 7M 5) lenM wstmvt A “'90 (112% W”
4w 4: ml' at my all at camera 1‘4ka will
val’an an w W or: made. WI m'lk WM
;A~LWJS, umtej law “hum k 0187,; 41* "AWS‘ (Lax/ole?“ vl’lu. ‘l‘lme ‘Tlm‘s MUMI vl’lm'l: m afarJAM
ltdtrng is +00 mam»). :1. Question incontinued (d) (8 points) Estimate the odds ratio 1:>etween applicant. and loyalty card use. Find a 95%
conﬁdence interval for this odds ratio, and interpret it in the context of this problem. 43 M“ = 94—73—— MAB/37' ‘ nil—“u ‘ l3"? ’ gm 4L“ R N‘LPO(Z, a». mac? qu gm 33'
[Doll/.0517 / an m, MILM 4m 41,; mm am am
lags, mm 0.01! ad 1.19:1. 724414 ,3, /am
752, 'wAM 4% #u was aﬁ arm/2'77 a $747!?
Cd/A 55067. {S 001 7"» [05' 19mg: {mwr 74f 8&5 ﬂaw” 4W xvi/tea. Question 2 (37 points total) Answer the following questions based on Model A of Part II of the the grocery store
analysis: (a) (6 points) Write down the generalized linear model that the owner ﬁt, including the
random component, systematic component and link function. we = ‘3 Wig/1:1 CMSW 
Y3” Poisum ' r av‘im ’
koﬂguﬁr—i o(+ @X; I )(L‘= it? 09% reglslts at 05W L (b) (3 points) Report the estiniiated prediction equation. : 2.8", *0.§7‘XL‘ (C) (6 points) Calculate a 95% conﬁdence interval for the openregs coefﬁcient, and interpret
it in the context of the problem. A )5: «43.5? §%(IEB= 0073 7370 Cf: ﬁt (.96 66‘ng
(440537] enf/Bé?) I 4M 79% “£102? 11% % expevlwﬂ damease In.
Io? a numbor all 001W ‘ﬁ‘rbr ewe/{S @zc(m
afﬁlslv enamel is how 0.6? and g‘qq' 4 Question 2, continued ((1) (10 points) Is the number of staffed" registers associated with the number of customers
waiting? Report the mantle, null hypothesis, value of the test statistic, the distribution
of your test statistic, and conclusions of your test. WAA'PQG itiﬁro ﬂyﬁ%0
Tcst sin’iﬁ'S‘ix'c e ~I331— = Z
1': U0 4‘5 “Hue, Z~ N‘[OII\ “Flynn/naive?
“F'Wlﬂue. A 2,4049 LET = tt’ ‘0 “ﬂ’éio T—
w
“i
u
w
«r;
T”
$
\
\
‘2
L:
n
~ E
“T
(\u Coming»: ﬂexed iib. m Mamba A: mrkna CM‘S‘IﬁN‘thS
SioymchAn‘ib dilemmas th ewﬂ mcrram ,'4 of,“ rtﬂo'flcrx. (6 points) Estimate the number of customers you would expect to be waiting on a.
. randomly s<'31(‘,(:te<i day if 4 of the registers are stafied. Show your work. ,(20 (A); 2.3% — 0.5100
J/M = 0.37? SE
ﬁf— eo $13“; '2}! Question 2, continued (f) (6 points.) Do you think this model ﬁts well? Brieﬂy explain (1—7 sentences). If you can
not the ﬁt of the. model with the provided output, explain What you would do if
you had access to the. data. and a computer. 72 euwmk m 41+ cﬁphlwue, ( CMsiobr'
(D overcasmm
@ Residuaﬂs
@ Lew/mag . @% VH4. reside lek, l sa— 4qu m. a? m
“Slim/Q: Art My ’fLmn. 4900+ 2’ but name. m “mm 3 aer "hm ML no «MusMQ. oLWWJA‘ms 60 94W: 714 Q’QQLOWL docs pul— skmo ans Wa‘b'm W @ Ll‘hwlﬂl “Le Leng flak (“Chablis 2(5W/ (Zack‘s dirlunce, 412%, W! emuls) 060 “0+ slaw ma glad!» closervmﬁms ol' Coma/n, ‘53» pWMA m. “IL Cara/fend»
ra‘l‘n‘o 4S0 putt «of Show dtj olefmf “Far Pym/IA l. 0 WC Low/i W +0 6J9, flnL W Var/ma rs. Samp/é Sampla mans W as egb'm‘lrd 74m ogwnﬁ‘m: W
by 415 bl: 0W prank/S. ' 6 Question 3 (12 points total) Answer the follcwing questions based on all analyses in Part II of the the grocery store
analysis: (a) (8 points) Conduct a Likelihood Ratio Test comparing models A and D. Be sure to state
your null hypothesis, value of the test statistic, the distribution of your test statistic;
and conclusions of your test in the context of this problem. Show your work. E95. barium.“— A= Ea. Damn“ “D —. maze LKT = /3/.39— @539 1 23.0;
W Myra : 0 HA: a w w it Wag M 5% w. 2.
[p W, LET ~ 7L2. .
. '2 ,
gm 23.0; >> 9 = mm mm. a @71; ML 0’
f rrjecl ’11" “we? h7po7l7’4835 My? cur/uer ‘7’Z\a‘i‘ WM A 1‘:
nor bold“. 41W mm, D.
(b) points) Consider all 11 models. VVhichmodel would you choose to use? Brieﬂy explain.
9402 “1‘24, wwMS an: nol'fllrmsw, / Cam, 40%“ ax LﬁT' '17»
6Mde “ﬂaw. luv/tape, / can VS! a ,4ch = 4/592
4165 a 53%;!
4146 = 5979476
ﬁrch = sat/m smiles} 141C is best, So I cLoosz malice D ﬂﬂg Grocery Store Data and Analysis A small grocery store owner is attempting to improve his customer service. He conducts two
analyses. Part I: Check—Out Speeds The owner plans to hire one new person to check out groceries.
He has narrowed his choices down to two applicants ~ Bob and Mikey. One of his consider—
ations is the speed of the applicant in conmleting orders. On a very busy day (where there
is always someone in line), he asks both Bob and Mikey to check out customers in the two
express lanes (15 items or less) for one hour. He counts the number of orders each applicant
completes. He also notes Whether the applicant convinced the customer to use a store loyalty
card when checking out. The results of this experiment are reported in the table below: Loyalty Card Yes iio l Total
Bob 6 13 19
Mikey 7 2 I 9
’ “otal 13 15 I 28 Here is some output from analyses conducted in R: Pearson’s Chisquared test
X~squared = 5.2406, df = 1, p—value = 0.02207 Log likelihood ratio (Gtest) test of independence without correction
Log likelihood ratio statistic (G) = 5.4397, X—squared df = 1, pvalue = 0.01968 Fisher’s Exact Test for Count Data
p—value = 0.04182
alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval:
0.01121498 1.05120975 Part II: Customer Waiting Times A small grocery store owner is studying the flow of customers through the store’s checkout
lines. The store has 5 cash registers, but does not always have enough staff to use them all, To
study the ﬂow, the store owner randomly selects 100 times and days to measure the number
of customers in line at that time (variable ‘inline’). He also records the number of staffed cash
registers (variable ‘openregs’), whether or not he measured on a weekday (l\/I(:)nday—Friday) or
weekend (Saturday—Sunday) (variable‘weekday‘), and whether or not. the store is offering sale
prices that day (variable ‘sale’). (Note that since the day and time are randomly selected, it
is reasonable to assume that the counts are independent from. one another.) The data is plotted here: Number of Customers 12345 No Yes Number of Staffed Registers Weekday Sale The owner tries three models to describe the number of customers waiting at his store. These
are detailed on the next few pages. ii Model A: Call:
glm(formu1a = inline ‘ openregs, family = poisson, data = grocery)
Deviance Residuals:
Min 10 Median SQ Max
—2.51890 —1.18828 0.01005 0.71525 2.50611
Coefficients:
Estimate Std. Error 2 value Pr(>lzl)
(Intercept) 2.84136 0.09741 29.17 <2e16 ***
openregs —O.57029 0.04266 13.37 <2e16 ***
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 347.64 on 99 degrees of freedom
Residual deviance: 131.39 on 98 degrees of freedom
AIC: 413.72
Number of Fisher Scoring iterations: 5
Residuals vs Fitted U. Normal Q—Q
(‘0 'a
2 9 N
g r .‘9 cu o
w ,_ .S
g ' w
'0 N
to 5' l
 4—1
03
0.0 1.0 2.0
Predicted values Theoretical Quantiles
; Scale—Location U. Residuals vs Leverage
'0‘; ._
9 i
8 O, c N
:: .,.. o
.9 E
> (3 O
% 0‘.)
. _ N
:9 O. 1:: 
Q 0 c7) 0.0 1.0 2.0 Predicted values iii 0.02 Leverage Cook's distance gm1covratio 0.10 0.00 Cook’s distance 0 20 4O 60 80 Obs. number covariance ratio 0 20 4O 60 80 Index gm1dfbeta[, 1] glm1diff 0.02 —0.04 0.4 —0.4 0.0 dfbeta (Intercept) O 20 40 60 80 Index dffits 0 20 4O 60 80 Index iv gm1dfbeta[, 2] 0.010 —0.010 dfbeta openregs O o o 00
a? $8 W 000
°Q> ﬁwﬁw 0Q9°° ®0°c9° <5 0 20 4O 60 80 Index Model B:
Call: glm(formula = inline “ weekday, family = poisson, data = grocery) Deviance Residuals:
Min IQ Median 30 Max
3.8448 1.5230 —0.2090 0.8239 3.2901 Coefficients: Estimate Std. Error 2 value Pr(>z)
(Intercept) 2.00030 0.07670 26.081 < 26—16 ***
weekday 0.78343 0.09863 ~7.943 1.98815 *** Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 847.64 on 99 degrees of freedom Residual deviance: 289.17 on 98 degrees of freedom AIC: 571.51 Number of Fisher Scoring iterations: 5 Residuais vs Fitted '0'
v  <1
(D
m 8 7o 93
a N g a: N
:3 O
79 Q g o
m .—
m 0 5
c: o 73
T 590 13' v
an I
09 1.2 1.4 1.6 1.8 2.0 Predicted values Theoretical Quantiies Scale—Location 3 .
'— 79
i’.» 5 v
§ 5 w
cu 9
'S m
(D a)
13 0. cu
2' rs '
Q as
i .2 1.4 1.6 i .8 2.0 0.00 0.02 0.04 Predicted values Leverage \f Cook’s distance glm2covratio V.
o 0.2 0.0 1.02 0.96 Cook’s distance 0 20 4O 60 80 Obs. number covariance ratio O 20 40 60 80 Index glm2dfbeta[, 1] glm2diff dfbeta (Intercept) RT
4 N
o g Q
0. .o O ._ o 1:
m g a
O _ .
. o
C: °’ ' 0 20 4O 6O 80 Index O 20 4O 60 80 index Vi dfbeta weekday 0 20 40 60 80 Index Model C:
Call: glm(formula  inline “ sale, family = poisson, data = grocery) Deviance Residuals:
Min 10 Median SQ Max
~3.2591 ~1.5293 0.2162 0.8160 3.2672 Coefficients: Estimate Std. Error 2 value Pr(>zl)
(Intercept) 1.22090 0.05998 20.357 <2e16 ***
sale 0.91261 0.10088 9.047 <2e16 *** Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 347.64 on 99 degrees of freedom Residual deviance: 274.64 on 98 degrees of freedom AIC: 556.98 Number of Fisher Scoring iterations: 5 Residuals vs Fitted '0 V as 0 g ‘1‘
.3 N g a, N
= S
g o o g o
0 o a
n: 0 g .3 <r '0 ‘3’ ' 5 1.2 1.6 2.0
Predicted values  Theoretical Quantiles
E Scale—Location U. Residuals vs Leverage
g . A .3 <r \
<1)
0 C N
a 2 'S m
d) d)
'0 CL N
2‘ Q a '
(.0. 0 a
1.2 1.6 2.0 0.00 0.02 0.04
Predicted values Leverage vii Cook’s distance gim3covratio 0.2 0.0 1.02 1.08 0.96 Cook’s distance 45 0 20 4O 60 80 Obs. number covariance ratio 0 20 4O 60 80 index gldefbetaL 1] gm3diff 0.01 ~0.01 0.4 —0.4 0.0 dfbeta (Intercept) 0 20 40 60 80 Index dffits 0 20 4O 60 80 Index viii glm3dfbeta[, 2] —0.06 0.00 0.06 dfbeta sale O 20 40 60 80 Index Model DZ Call; glm(formula = inline " openregs + weekday + sale, family = poisson,
data = grocery) Deviance Residuals:
Min 10 Median SQ Max
—2.38377 —1.15428 0.07962 0.67986 2.15945 Coefficients:
Estimate Std. Error 2 value Pr(>lzl)
(Intercept) 3.20936 0.20668 15.528 < 2e—16 *** openregs 0.54128 0.04642 11.661 < 29—16 ***
weekday 0.58363 0.16556 8.525 0.000423 ***
sale 0.12973 0.17940 —0.723 0.469594 Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 347.64 on 99 degrees of freedom Residual deviance: 108.36 on 96 degrees of freedom AIC: 394.69 Number of Fisher Scoring iterations: 5 Residuals vs Fitted 6 Normal Q—Q
N g N
2 23
(U
5 o g o
U) '5
‘1’ m
0: N 'o
33‘
OD —2 0 1 2
Predicted values Theoretical Quantiles
5 Scale—Locatlon U. Residuals vs Leverage
L 9—) N
‘D o c F' 8
.S a o
(D (D
13 CL
2‘ c2 :9 s!
Q o a) 0.0 1.0 2.0 0.00 0.10 0.20 Predicted values Leverage ix Cook’s distance glm4dfbeta[, 3] glm4diff 0.10 0.20 0.00 —0.05 0.05 —0.6 0.0 0.6 Cook’s distance 35 51 0 20 40 60 80 Obs. number dfbeta weekday 0 20 40 60 80 Index O 20 40 60 80 Index gIm4dfbeta[, 1] gIm4dfbeta[, 4] —0.10 0.00 0.10 —0.05 0.05 dfbeta (Intercept) 0 20 4O 60 80 dfbeta sale 0 20 40 60 80 Index Index dfbeta openregs a?
w” m
33 8.
“.5 O
E o
a '5
C?
o 20 4o 60 80
Index
covariance ratio
.9 o
n: O
*5 o o 00 00300
8 0 O©%OCDe
E [email protected]%o Q)
a 00 00 o O 0 20 4O 60 80 Index ...
View
Full
Document
This note was uploaded on 07/26/2011 for the course STA 665 taught by Professor Staff during the Spring '10 term at Ohio State.
 Spring '10
 Staff

Click to edit the document details