I am having major issues with a simulation program for my TI-83. here is the question:
a pair of dice is rolled repeatedly. simulate the probability that a sum of 7 is rolled before a sum of 8.
i know the answer is 6/11 but i cant get the program right on my calc.
any help would be great
thanks
Ti-83 Programming Question
Moderator: MaxCoderz Staff
could you give some more details? Source code?
Kerm's SourceCoder is an easy way to post your source code. Just upload the file, and it'll take care of the rest.
Kerm's SourceCoder is an easy way to post your source code. Just upload the file, and it'll take care of the rest.
In Memory of the Maxcoderz Trophy
-
- New Member
- Posts: 2
- Joined: Tue 28 Nov, 2006 12:59 am
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
If you need the logic for such a thing, it's really very simple. You create a list from 1 to 11, and then every roll of the dice adds 1 to L1(number - 1), because the dice rolls start at 2.
To dislplay the rolls right, you will need somewhere in the range of a few thousand rolls of the dice, so keep that in mind. Then you should make a graph onscreen of the ratios between numbers. This can be done by setting xmin and xmax to your spacing preference, then setting ymin to 0 and ymax to the highest value in the list. (use the max() function) then just draw lines to represent the current graph, and after a while the trend should start to appear as a "hill" with the peak of the hill being right on 7.
This kind of probability simulation is already implemented in an APP on most TI-83 Plus family calcs, called ProbSim I believe.
Good lick with your program!
-gamefreak
To dislplay the rolls right, you will need somewhere in the range of a few thousand rolls of the dice, so keep that in mind. Then you should make a graph onscreen of the ratios between numbers. This can be done by setting xmin and xmax to your spacing preference, then setting ymin to 0 and ymax to the highest value in the list. (use the max() function) then just draw lines to represent the current graph, and after a while the trend should start to appear as a "hill" with the peak of the hill being right on 7.
This kind of probability simulation is already implemented in an APP on most TI-83 Plus family calcs, called ProbSim I believe.
Good lick with your program!
-gamefreak
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
- silver calc
- New Member
- Posts: 73
- Joined: Tue 28 Mar, 2006 10:50 pm
- Location: Wouldn't you like to know?