PDA

View Full Version : Math Talk (how do you compute that?)


CornPuff
June 2nd, 2006, 11:21 AM
Well, I was going to do this all in the same thread as 'Ask a math question'. But then I realized that math geek talk would hijack the original.

So, formulas, math geek musings and functions go here.
Questions and answers go in the other thread.


I use mathematica to do all of my work. Anyone else use it? I hear its very similar to maple.

CornPuff
June 2nd, 2006, 11:37 AM
Calculating avg number of rounds until...

Take the drop for instance
I dont know if this was the easiest way to go about it, but I started with an infinite sum.

1*(8/20) + 2*(8/20)(12/20) + 3*(8/20)(12/20)^2 + 4*(8/20)(12/20)^3 + 4*(8/20)(12/20)^3 ....

8/20 is the probability of success, 12 out of 20 is the probability for failure
the initial 1 is the round number. So, what you have is the round number multiplied by the probability of getting the drop that round. For instance, to get the drop on the 3rd round, you would have to fail twice and succeed the 3rd time: (8/20)(12/20)^2.

The sum is easy for mathematica :)
if prob os success = P, and prob of failure = Q, the result is Sum(n*P*Q^n-1, as n goes from 1 to infinity)

mathguy
June 2nd, 2006, 12:40 PM
I use Mathematica.
The Heroscape matchup calculator is written in Mathematica and Perl.

mathguy
June 2nd, 2006, 12:44 PM
Calculating avg number of rounds until...

Take the drop for instance
I dont know if this was the easiest way to go about it, but I started with an infinite sum.

1*(8/20) + 2*(8/20)(12/20) + 3*(8/20)(12/20)^2 + 4*(8/20)(12/20)^3 + 4*(8/20)(12/20)^3 ....

8/20 is the probability of success, 12 out of 20 is the probability for failure
the initial 1 is the round number. So, what you have is the round number multiplied by the probability of getting the drop that round. For instance, to get the drop on the 3rd round, you would have to fail twice and succeed the 3rd time: (8/20)(12/20)^2.

The sum is easy for mathematica :)
if prob os success = P, and prob of failure = Q, the result is Sum(n*P*Q^n-1, as n goes from 1 to infinity)

The above works.
A simpler method is to use the fact that the probability of a successful drop is p = 8/20.
Then on the average it takes 1/p = 20/8 = 2.5 rolls to succeed.

(This makes intuitive sense because in the "long run", if the probability is p, then 1 out of every 1/p rolls is a success.)

TheRealQ
June 2nd, 2006, 08:57 PM
I haven't used Mathematica in many years but I did get to beta test it. It was pretty cool and easy to set up. The problem though is that I didn't learn as much and now seem to draw a blank from that period. I have completely forgotten my Calculus so I never solve things to the infinite but instead write out everything longform to a finite destination.

If I get too confused with my own equations then I'll whip out Excel and build my equations in pieces and let it put them all together.