Two players are interested in having a game of dice. A single dice is rolled until either two consecutive unequal even numbers appears, or alternatively, a 2, followed immediately by 3. For example, a 2-4 pair is two consecutive unequal even numbers but a 2-2 pair is not. We are interested in which event is more likely to occur, a pair of two consecutive unequal even numbers, or a 2-3 pair? The players would like to investigate.
The SAS data set called dice contains the result of 10000 rolls of a dice. Every time we obtain a pair of two consecutive unequal even numbers or a 2-3 the game is restarted.
Example 1 : rolling 4-6-2 counts as a 4-6 but not as a 6-2.
Example 2 : rolling 4-2-3 counts as a 4-2 but not as a 2-3.
Example 3 : rolling 4-2-2-3 counts as two pairs; a 4-2 and a 2-3.
Example 4 : rolling 4-2-4-6 counts as two pairs; a 4-2 and a 4-6.
Using the SAS data set dice, create two new SAS data sets EvenNum and TwoThree, each containing the one variable, NumRolls. The variable NumRolls indicates the number of dice rolls it took since the last restart. Submit code, and appropriate PROC for both EvenNum and TwoThree. Which event appears more likely to occur, a pair of two consecutive unequal even numbers, or a 2-3 pair? Give the probability and the mean numbers of NumRolls for the events.
对不起英文版给大家添加麻烦了。
大概就是说只要碰到2-3组合或者是非等偶数组合 游戏就会从头算起
然后放到两个不同的data set里面因为条件不一样,然后建立一个新的variable 数出每两个重启之间的筛筛数量。
请求高手帮忙啊~~~~
想破脑袋了。。。。


雷达卡





京公网安备 11010802022788号







