Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In an experiment to investigate the effect of color of paper (blue=1, green=2, o

ID: 3313938 • Letter: I

Question

In an experiment to investigate the effect of color of paper (blue=1, green=2, orange=3) on response rates for questionnaires distributed by the “windshield method” in supermarket parking lots, 12 representative supermarket parking lots were selected in an area and each color was assigned at random to four of the lots. The response rates (in percentage) and the size of parking lots are shown below.

Response Rate Color

27 1

26 1

31 1

27 1

34 2

29 2

25 2

31 2

31 3

25 3

27 3

29 3

(e) Compute 99% C. I. for contrast L=2-0.5(1+3), and complete the hypothesis test: H0:L=0 vs Ha:L0 given =0.05. When you run the test, please try both t and F tests

(f) Compute 95% Bonferroni simultaneous C.I for 1-2, 1-3, 2-3.

(g) Complete Bonferroni simultaneous test on the contrast in part (e).

Explanation / Answer

Data

<

-read.table”CH16PR08.txt”

: Input the data to a data frame called ”Data”

Measure

<

-Data[,1]

: Store the entire measurement in a vector called ”Measure”

Blue

<

-Data[1:5,1]

: Store the measurements from the ”Blue group” in a vector

called ”Blue”

Green

<

-Data[6:10,1]

: Store the measurements from the ”Green group” in a vec-

tor called ”Green”

Orange

<

-Data[11:15,1]

: Store the measurements from the ”Orange group” in a

vector called ”Orange”

Level

<

-Data[,2]

: Store the factor levels of the measurements in a vector called

”Level”

To get the dot plot, simply input

plot(Level, Measure)

To get the fitted values level ”Blue”, input

fit1

<

-mean(Blue)

to store the fitted value for the blue level in

fit1

similar for another two levels(assume they are called fit2, fit3)

To get the residuals for blue level, input

Res1

<

-Blue-fit1

to store the residuals for the blue level measurement in

Res1

similar for another two levels(assume they are called Res2 and Res3)

To get the ANOVA table, input:

model

<

-lm(Measure factor(Level))

anova(model)

In the ANOVA table returned by R, degree of freedoms, sum of squares, mean

squares, test statistics

F

and p-value of the equality test are given.

To get the critical value of F-distribution with degree of freedoms

df1

and

df2

and significant level

(denoted by

F

(1

,df

1

,df

2)), input in R:

qf(1-

,df1,df2)

To draw the conclusion, we can compare the p-value with significant level

OR

compare

F

with critical value, both comparison should return the same

conclusion.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote