Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expected pokeball count #17

Open
ELynx opened this issue Sep 5, 2016 · 1 comment
Open

Add expected pokeball count #17

ELynx opened this issue Sep 5, 2016 · 1 comment

Comments

@ELynx
Copy link

ELynx commented Sep 5, 2016

With given probabilities, you can calculate on what throw Pokemon is likely to be caught.
Of course it still can be caught on 1st throw or not caught on 100th, but a good estimate of spent resources is more intuitive than pure probabilities.
Here is the math behind Number of trials to first success

@pperle
Copy link
Owner

pperle commented Sep 5, 2016

@ELynx Thank you very much for your contribution, this means a lot to me.
I think the most interesting value would be the standard deviation which simply is:

\sigma = \sqrt{\frac{1-p}{p^{2}}}

codecogseqn
where p is the probability

In order to calculate "y% a success is in the first x throws" the formula would look like this:

y=1-(1-p)^x
1-y=(1-p)^x
\log_{1-p}(1-y)=x

codecogseqn 2
where p=probability, x=number of throws and y=success rate.

Example (30% probability to catch the pokémon and we want a success rate of 90%):

\log_{1-0.3}(1-0.9)=6.45570

But the standard deviation would be:

\sigma = \sqrt{\frac{1-0.3}{0.3^{2}}} = 2.78887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants