Seating at GC I Thinking back again to the m111survey data frame, recall that the variable seat records where each subject prefers to sit in a classroom: Front, Middle, or Back. Here is a table of the results: gcSeat <- xtabs(~seat,data=m111survey) gcSeat ## seat ## 1_front 2_middle 3_back ## 27 32 12 Now at Georgetown most classrooms are fairly small, with at about four rows actually in use: the first row is obviously the Front; most people would think of the second and third rows as the Middle; the fourth row would count as the Back. If preferences for the four rows are exactly the same out there in the GC population, then one would expect that: 25% of the population prefers the Front; 50% prefer the middle (twice as many rows in the Middle, after all); 25% prefer the back. We wonder if the available data provide strong evidence against the idea of equal preference among all four rows. Since seat is a factor variable, it makes sense to investigate our Research Question with chisqtestGC(). We define parameters and hypotheses as follows: Let pf = the proportion of all GC students who prefer the Front. pm = the proportion of all GC students who prefer the Middle. pb = the proportion of all GC students who prefer the Back. The Hypotheses are: H0: pf = 0.25, pm = 0.50, pb = 0.25. Ha: At least one of the values in H0 is not correct. Which of the following bits of R-code would do the job for us? (There are three correct answers.) Group of answer choices ( ) chisqtestGC(gcSeat, p=c(0.33,0.33,0.33)) ( ) chisqtestGC(~seat,data=m111survey, p=c(0.25,0.50,0.25)) ( ) chisqtestGC(~Seat,data=m111survey, p=c(0.25,0.50,0.25)) ( ) chisqtestGC(gcSeat,p=c(0.25,0.50,0.25)) ( ) chisqtestGC(~seat,data=m111survey, p=c(0.25,0.50,0.25), simulate.p.value=TRUE,B=5000) ( ) chisqtestGC(~seat,data=m111survey, p=c(0.33,0.33,0.33))
Seating at GC I
Thinking back again to the m111survey data frame, recall that the variable seat records where each subject prefers to sit in a classroom: Front, Middle, or Back.
Here is a table of the results:
gcSeat <- xtabs(~seat,data=m111survey)
gcSeat
## seat
## 1_front 2_middle 3_back
## 27 32 12
Now at Georgetown most classrooms are fairly small, with at about four rows actually in use:
- the first row is obviously the Front;
- most people would think of the second and third rows as the Middle;
- the fourth row would count as the Back.
If preferences for the four rows are exactly the same out there in the GC population, then one would expect that:
- 25% of the population prefers the Front;
- 50% prefer the middle (twice as many rows in the Middle, after all);
- 25% prefer the back.
We wonder if the available data provide strong evidence against the idea of equal preference among all four rows.
Since seat is a factor variable, it makes sense to investigate our Research Question with chisqtestGC(). We define parameters and hypotheses as follows:
Let
pf = the proportion of all GC students who prefer the Front.
pm = the proportion of all GC students who prefer the Middle.
pb = the proportion of all GC students who prefer the Back.
The Hypotheses are:
H0: pf = 0.25, pm = 0.50, pb = 0.25.
Ha: At least one of the values in H0 is not correct.
Which of the following bits of R-code would do the job for us? (There are three correct answers.)
( ) chisqtestGC(gcSeat,
p=c(0.33,0.33,0.33))
p=c(0.25,0.50,0.25))
( ) chisqtestGC(~Seat,data=m111survey,
p=c(0.25,0.50,0.25))
( ) chisqtestGC(gcSeat,p=c(0.25,0.50,0.25))
( ) chisqtestGC(~seat,data=m111survey,
p=c(0.25,0.50,0.25),
simulate.p.value=TRUE,B=5000)
p=c(0.33,0.33,0.33))
Step by step
Solved in 2 steps with 2 images