I have this Stats problem due tomorrow and I can get my application for my TI-84 to work. Could someone help me out.
Here is the problem:
Suppose there are eight hermits on an island, and that one of the hermits becomes infected with a certain strain of virus. The infected hermit is contagious for a 24-hour period and not thereafter, and once a hermit has this particular infection, the hermit is immune thereafter. Further suppose that the
infected hermit randomly selects one of the other hermits to visit on the day he is contagious, and that the second hermit to become infected repeats the process. If the visited hermit has already had the infection and is immune, the epidemic dies out.
I have to come up with a Program on the calculator. This is what I have so far:
0?B
randInt(1,8)?A
B+1?B
randInt(1,8,1)?C
If A?C:Then B+1?B
If A=C Then Repeat
randInt(1,8,1)?D
If A?D and C?D Then B+1?B
If A=D or C=D Then disp B
randInt(1,8,1)?E
If A?E and C?E and D?E Then B+1?B
If A=E or C=E or D=E Then disp B
randInt(1,8,1)?F
If A?F and C?F and D?F and E?F Then B+1?B
If A=F or C=F or D=F or E=F Then disp B
randInt(1,8,1)?G
If A?G and C?G and D?G and E?G and F?G Then B+1?B
If A=G or C=G or D=G or E=G and F=G Then disp B
randInt(1,8,1)?H
If A?H and C?H and D?H and E?H and F?H and G?H Then B+1?B
If A=H and C=H and D=H and E=H and F=H and G=H Then disp B
randInt(1,8,1)?I
If A?I and C?I and D?I and E?I and F?I and G?I Then B+1?B
If A=I and C=I and D=I and E=I and F=I and G=I Then disp B
Could anyone look at this model or advise me on how to make a quick program to simulate this. Thanks.
Edit: The question mark represents the STO key. It didn't paste in correctly.
Here is the problem:
Suppose there are eight hermits on an island, and that one of the hermits becomes infected with a certain strain of virus. The infected hermit is contagious for a 24-hour period and not thereafter, and once a hermit has this particular infection, the hermit is immune thereafter. Further suppose that the
infected hermit randomly selects one of the other hermits to visit on the day he is contagious, and that the second hermit to become infected repeats the process. If the visited hermit has already had the infection and is immune, the epidemic dies out.
I have to come up with a Program on the calculator. This is what I have so far:
0?B
randInt(1,8)?A
B+1?B
randInt(1,8,1)?C
If A?C:Then B+1?B
If A=C Then Repeat
randInt(1,8,1)?D
If A?D and C?D Then B+1?B
If A=D or C=D Then disp B
randInt(1,8,1)?E
If A?E and C?E and D?E Then B+1?B
If A=E or C=E or D=E Then disp B
randInt(1,8,1)?F
If A?F and C?F and D?F and E?F Then B+1?B
If A=F or C=F or D=F or E=F Then disp B
randInt(1,8,1)?G
If A?G and C?G and D?G and E?G and F?G Then B+1?B
If A=G or C=G or D=G or E=G and F=G Then disp B
randInt(1,8,1)?H
If A?H and C?H and D?H and E?H and F?H and G?H Then B+1?B
If A=H and C=H and D=H and E=H and F=H and G=H Then disp B
randInt(1,8,1)?I
If A?I and C?I and D?I and E?I and F?I and G?I Then B+1?B
If A=I and C=I and D=I and E=I and F=I and G=I Then disp B
Could anyone look at this model or advise me on how to make a quick program to simulate this. Thanks.
Edit: The question mark represents the STO key. It didn't paste in correctly.