240,955 views
28 votes
28 votes
Seven students volunteered for a comparison of study guides for an advanced course in mathematics. They were randomly assigned, four to study guide A and three to study guide B. All were instructed to study independently. Following a two-day study period, all students were given an examination about the material covered by the guides, with the following results:Study Guide A scores: 68; 77; 82; 85Study Guide B scores: 53; 64; 71Perform a randomization test by listing all possible ways that these students could have been randomized to two groups. There are 35 ways. For each outcome, calculate the difference between sample averages. Finally, calculate the two-sided p-value for the observed outcome

User Kamran Omar
by
2.2k points

1 Answer

18 votes
18 votes

Answer:

Explanation:

From the given question; we can use the R software to program the combination function that generates all the combinations.

options(digits =2(

scores<- c(68,77,82,85,53,64,71)

groupA <- combn(scores,4)

groupB <- apply(groupA,2, function(x) scores[! (scores %in% x) ] )

colnames(groupA) <- colnames(groupB) <- paste("G", 1:35, sep"")

The accompanying 35 groupings (G1 to G35) contain all potential ways these understudies can be randomized under the null hypothesis

Group A


\text{G1 \ G2 \ G3 \ G4 \ G5 \ G6 \ G7 \ G8 \ G9 \ G10\ G11\ G12 \ G13 \ G14}


\text{68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68 \ \ 68}


\text{77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 77 \ \ 82 \ \ 82 \ \ 82 \ \ 82}


\text{82 \ \ 82 \ \ 82 \ \ 82 \ \ 85 \ \ 85 \ \ 85 \ \ 53 \ \ 53 \ \ 64 \ \ 85 \ \ 85 \ \ 85 \ \ 53}


\text{85\ \ 53 \ \ 64 \ \ 71 \ \ 53 \ \ 64\ \ 71\ \ 64 \ \ 71 \ \ 71 \ \ \ 53 \ \ \ 64 \ \ 71 \ \ 64}


\text{G15 G16 G17 G18 G19 G20 G21 G22 \ G23 \ G24 \ G25 \ G26 \ G27}


\text{68 \ \ \ 68 \ \ \ 68 \ \ \ 68 \ \ \ 68 \ \ \ 68 \ \ \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 \ \ 53 \ \ \ 53 \ \ \ 85 \ \ \ 85 \ \ \ 85 \ \ \ 64 \ \ \ 53 \ \ \ 53 \ \ \ 85 \ \ \ 85}


\text{71 \ \ \ 71 \ \ \ 71 \ \ \ 64 \ \ \ 71 \ \ \ 71 \ \ \ 64 \ \ \ 71 \ \ \ 64 \ \ \ 53 \ \ \ 71 \ \ \ 71 \ \ \ 64 \ \ \ 71 \ \ \ 64}


\text{G16 \ G17 \&nbsp;G18 \&nbsp;G19 \&nbsp;G20 \ G21 \ G22\ \ G23\ \ G24\ \ G25 \ \ G26 \ \ G27\ \ G28}


\text{77\ \ \ \ 77\ \ \ \ 77\ \ \ \ \ 77\ \ \ \ \ 77\ \ \ \ \ 68\ \ \ \ 68\ \ \ \ 68\ \ \ \ 68\ \ \ \ 68\ \ \ \ \ 68\ \ \ \ \ 68\ \ \ \ \ 68}


\text{85 \ \ \ \ 82\ \ \ \ 82 \ \ \ \ 82 \ \ \ \ 82 \ \ \ \ 64 \ \ \ \ 53 \ \ \ \ 53 \ \ \ \ 85 \ \ \ \ 85\ \ \ \ 85 \ \ \ \ 82\ \ \ \ 82}


\text{53\ \ \ \ 71\ \ \ \ 64\ \ \ \ 53\ \ \ \ 85\ \ \ \ 71\ \ \ \ 71\ \ \ \ 64\ \ \ \ 71\ \ \ \ 64\ \ \ \ 53\ \ \ \ 71\ \ \ \ 64}


\text{ G29 \ G30\ G31 \ G32 \ G33 \ G34 \ G35} \\ \\ \text{68 \ \ \ 68 \ \ \ 68 \ \ \ \ 68 \ \ \ \ 68 \ \ \ 68 \ \ \ \ \ 68} \\ \\ \text{82 \ \ \ 82 \ \ \ \ 77 \ \ \ \ 77 \ \ \ \ 77 \ \ \ \ 77 \ \ \ \ 77} \\ \\ \text{53 \ \ \ 85 \ \ \ \ 71 \ \ \ \ 64 \ \ \ \ 53\ \ \ \ 85 \ \ \ \ 82} \\ \\

The accompanying data below computes the distinctions for each group:


difference <- colMeans(groupA) - colMeans(groupB)


\text{G1 G2 G3 G4 G5 G6 G7 G8 G9 \ G10 G11 G12 G13 G14 G15} \\ \\ \text{15 -3.3 3.1 7.2 -1.6 4.8 8.9 -14 -9.8 -3.3 1.3 \ 7.8 \ 12 \ -11 \ \ -6.8}


\text{G16 G17 G18 G19 G20 G21 G22 G23 G24 G25 G26 G27 G28} \\ \\ \text{-0.42 \ -9.2\ -5.1\ 1.3 \ -17\ \ 6.6 \ \ 13 \ 17 \ \ -5.7\ -1.6 \ \ 4.8 \ \ -3.9 \ \ 0.17}


\text{ G29\ \ G30 \ G31 \ G32 \ \ G33 \ G34 \ \ G35} \\ \\ \text{6.6 \ \ \ -12 \ \ \ -1 \ \ \ 3.1 \ \ \ 9.5 \ \ \ -9.2 \ \ \ -7.4}

The two-sided p-value is the extent of contrasts between test midpoints as large or bigger in supreme value than the primary group. The cat function makes the outcomes simpler to peruse.

p <- sum (aba(difference)>=difference[1])/35

cat(p)

= 0.086

User Antony Hatchkins
by
3.1k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.