Chapter 6 Bernoulli Trials Revisited 6 1 Is p Constant Recall that there are three assumptions to BT The first that each trial yields a dichotomy is easy to verify or refute The other two assumptions can neither be verified nor refuted with certainty In this Section we present methods for investigating the second assumption that the probability of success remains constant Our methods will consist of informal descriptive techniques and formal tests of hypotheses Both of these categories of methods are very useful to a scientist I begin with an extended example of data I collected circa 1990 on Tetris Tetris is a video game I fear that this expression video game is hopelessly dated perhaps you can give me a better name to use for the next version of these notes that can be played on a variety of systems If you have never played Tetris then the following description of the game may be difficult to follow Tetris rewards spatial reasoning and not surprisingly lightning reflexes Essentially one of seven possible geometrical shapes of four blocks falls from the top of the screen The player translates and or rotates the falling shape in an attempt to complete with no gaps a horizontal row of blocks Each completed row of blocks disappears from the screen and blocks above if any drop down into the vacated space to allow room for more falling shapes A player s score equals the number of rows completed before the screen overflows which means that the current game is over After every ten completed lines the speed of the falling shapes increases making the game more difficult Each drop of a shape by the computer can be viewed as a trial Each trial has seven possible outcomes For now the shapes are divided into two types a straight row my favorite labeled a success and any other shape a failure I observed 1 872 trials during eight games of Tetris on my son s Nintendo System The methods I present below are based on taking the total number of trials 1 872 in the current case and dividing them into two or more segments The choice of segments is a matter of taste and judgment and unless I have a good reason to do otherwise I advocate dividing the data into segments of equal or nearly equal length and I usually advocate having two segments of trials For these Tetris data however there is a structure that I want my analysis to reflect namely every time a game ends the system is reset before the next game There was literally a button that said Reset Thus 65 Table 6 1 A Comparison of Eight Games of Tetris Frequencies Game S F Total First 22 171 193 Second 33 185 218 Third 36 215 251 Fourth 25 206 231 Fifth 30 198 228 Sixth 42 220 262 Seventh 33 215 248 Eighth 33 208 241 Total 254 1618 1872 Row Proportions S F Total 0 114 0 886 1 000 0 151 0 849 1 000 0 143 0 857 1 000 0 108 0 892 1 000 0 132 0 868 1 000 0 160 0 840 1 000 0 133 0 867 1 000 0 137 0 863 1 000 0 136 0 864 1 000 Figure 6 1 Plot of Proportion of Success for Eight Games of Tetris 0 16 0 12 0 08 0 04 0 00 1 2 3 4 5 6 7 8 Game I divide my 1 872 trials into eight segments with each segment consisting of the trials of a game The outcomes by game are given in Table 6 1 and graphed in Figure 6 1 There is some variation in the proportion of successes from game to game but nothing remarkable Thus I conclude descriptively that there is little evidence against the second assumption of Bernoulli Trials Actually I have gotten a little ahead of myself in telling this tale I need to introduce some notation If we have BT then there is a single p which may be known or unknown to the researcher We want however to investigate whether or not it is reasonable to make this assumption We divide our data in r 2 segments For the Tetris data I have chosen r 8 segments I assume that within each segment we have BT and that the probability of success in segment i is given by pi Thus for example I assume that each of my eight games of Tetris were BT with game i have probability of success given by pi And now here is the key idea If all the pi s are the same number then we do have a single probability of success for the total of 1 872 trials i e we have BT But if even one pair of pi s do not agree in value then we do not have BT for the entire sequence Thus we want to decide whether or not all the pi s are the same number This suggests per66 forming a test of hypotheses and we will do that now The null hypothesis is H 0 p1 p2 pr The alternative hypothesis is H1 Not H0 i e there exists at least one pair i and j such that pi 6 pj Of course the researcher selects a significance level The test statistic is very similar to what we had in the previous chapter for the Goodness of Fit Test The first similar feature is that we once again have O s and E s The O s are not surprisingly the observed counts in Table 6 1 i e the 16 counts in the S and F columns The E s of course are the expected values of those counts calculated on the assumption that the null hypothesis is true Well the null hypothesis states that the 1 872 trials all have the same p but the p is unknown to the researcher Thus we need to estimate that p We want to estimate it as accurately as possible so we use all 1 872 trials and get p 254 1872 0 136 We now use this estimated p to obtain our E s For example consider the upper left cell in the table the cell that counts the number of successes in the first game There are 193 trials in game 1 so the expected number of successes is 193p which we estimate to be 193p 193 0 136 26 2 compared to O 22 for this cell There is another way to view the computation of E and this alternate way is very helpful to us Staying in the upper left cell we see that E 193 0 136 193 254 1872 26 2 Here is the key idea Notice that the E for the upper left cell is obtained by first calculating the product of the row total for that cell 193 and the column total for that cell 254 Then we take this product and divide by the grand total in the table 1872 in words E is row total times column total divided …
View Full Document