It is currently Tue Sep 25, 2018 6:20 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Statistics question
PostPosted: Fri Mar 16, 2018 2:05 am 
Offline
Member
User avatar

Joined: Sep 28, 2016
Posts: 2276
Preferred Pronoun Set: he/him/his/his/himself
Suppose that I play an infinite number of games, with a probability of winning equal to N. After each game, I record my result and update my win/loss ratio. Knowing N, what is a probability M of my win/loss ratio NEVER being positive ? ( positive is >1, not >0, in this context)
If N = 0.5 (50%), M = 0 is a pretty strong intuition.
But what about N = 0.01 (1%) ? The probability of compensating for P failures is now 1/(100^P), and every other failed game drastically lowers that chance. M, of course, isn't 1 (100%), it's lower than 1-N, of course, but is it still 0 ?

_________________
nice quotes from this forum


Like this post
Top
 Profile  
 
 Post subject: Re: Statistics question
PostPosted: Sat Mar 17, 2018 2:09 pm 
Offline
Member
User avatar

Joined: Sep 28, 2016
Posts: 2276
Preferred Pronoun Set: he/him/his/his/himself
Solved.

The probability of M (win/loss rate is never above 1) for infinite number of games with a probability of victory N is equal to

1 - SUM(n = 1, 2, ..., +infinity)( N^n * (1-N)^(n-1) * (2n - 2)! / (n-1)! * n!)

Well s..t ! This is one hell of a formula...

Fortunately, it simplifies to 1 - N/(1-N) for 0<N<1/2, and to 1 for 1/2<N<1.

This took multiple hours of tree-drawing, calculation, and analysis (both kinds).

This actually is some pretty unexpected results - this means that if you roll a 1d4 an infinite number of times, there's a 2/3 (!) probability of you NEVER having more 4s then 1s, 2s, and 3s, despite that there definitely ARE strings of 100, 1000000, 100^100 fours in your results. (Infinitely many of each of those, in fact.)

This also means that only with a test with a perfect 50% probability you are guaranteed to have both a winning and a losing winrate at one point.

_________________
nice quotes from this forum


Like this post
Top
 Profile  
 
 Post subject: Re: Statistics question
PostPosted: Sun Mar 18, 2018 7:44 am 
Offline
YMtC Champ '11
YMtC Pro Tour Champion
YMtC Idol Winner
User avatar

Joined: Sep 23, 2013
Posts: 9095
Preferred Pronoun Set: he/him/my/mine/himself
idk what your formula is based on, but from my understanding of infinite, the probability is either 0 or 1. You can't make a claim that it "won't happen", because the sequence has no end. There is no point where you can say "it's no longer possible".
Viewed from another angle, you can't make a claim that there is more of element a than element b in an infinite sequence of randomly determined elements, because the quantity for each of them is infinite.

_________________
In the custody of febb since 12.05.16
[Warchief] Custom EDH Project

you're like the kind of person who would cast Necropotence irl


Like this post
Top
 Profile  
 
 Post subject: Re: Statistics question
PostPosted: Sun Mar 18, 2018 9:33 am 
Offline
Member
User avatar

Joined: Sep 28, 2016
Posts: 2276
Preferred Pronoun Set: he/him/his/his/himself
Fair enough, but, you know, converging infinite sums are a thing that exists.

THE PROOF, shortened and improved:

1) The probability of never having a positive win rate is equal to 1 minus the probabilities of every possible way of getting to a positive win rate for the first time.
2) To get a positive win rate for the first time, you need to get exactly one more win than loss, and to never have more wins than losses before.
3) This means that you can only get a positive win rate after an odd game, because after even games you'll have either 2+ more wins, 2+ more losses, or equal number of wins and losses.
4) For your first time of getting a positive win rate, you can get a 1/0, 2/1, 3/2, 4/3, ... win/loss ratios. Let's examine them one by one.
5) The probability of getting a 1/0 as your first positive win ratio is, obviously, exactly N, as you need to win your first game. (And there is only one way of doing that. This remark may seem nonsense now, but more on that later.)
6) The probability of getting a 2/1 as your first positive win rate is a bit more complicated. You need to lose your first game, win your second game, then win your first game. Let's write that sequence as L-W-W. The probability of this is (N-1)*N*N, or (N-1) * N^2, where N-1 is a probability of losing. (Still, only one way of doing this.)
7) The probability of getting a 3/2 as your first positive win rate is different, because there is more than one way of getting to it. Two, to be exact: L-W-L-W-W, and L-L-W-W-W. The number of losses and wins is same for both ways, so their combined probability is equal to (1-N)*(1-N)*N*N*N*2 or (1-N)^2 * N^3 * 2
8) The probability of getting a 4/3 as your first positive win rate is more complicated again, because there are five ways to get there - L-L-L-W-W-W-W, L-W-L-W-L-W-W, L-L-W-L-W-W-W, L-W-L-L-W-W-W, L-L-W-W-L-W-W. Again, their combined probabilities are (N-1)^3 * N^4 * 5.
9) Everything to the power of 0 is 1, and everything to the power of 1 is itself. This means that the pattern of powers is clear: for n, where n is the number of wins in your first positive win rate, the probability of any one of the paths to it is N^n * (1-N)^(n-1).
10) If you continue calculating numbers of paths for possible first positive win rates, they will be 1, 1, 2, 5, 14, 42, 132, ... Those are known as Catalan numbers, and play an important role in combinatorics. Their usual, simplest formula is (2n)! / (n+1)! * n! , but it gives 1, 2, 5, 14... for n= 1, 2, 3, 4 - the first 1 in the sequence is the 0th term (for n=0). This means we'll have to use (2n-2)! / n! * (n-1)!, which is the same, but with 1 subtracted from each n.
11) This means, the probability to get n/n-1 as your first positive win rate is N^n * (1-N)^(n-1) * (2n-2)! / n! * (n-1)!
12) This means, the probability to get a positive win rate at any point is SUM(n = 1, 2, ..., +infinity)(N^n * (1-N)^(n-1) * (2n - 2)! / (n-1)! * n!). And yeah, this series converges for 0<N<1, and not just to "1 or 0".
13) This means, the probability to NEVER get a positive win rate at any point is 1 - SUM(n = 1, 2, ..., +infinity)(N^n * (1-N)^(n-1) * (2n - 2)! / (n-1)! * n!)

PROOF OF SIMPLIFICATION:

Let S = probability of ever getting a positive win rate (our infinite sum). Obviously, S is not equal to 0.
M = 1 - S.

Also, let 0<N<1/2.

If N would be 1/2 <N<1, by the law of large numbers, S would be 1, because win rate will tend to be positive, and so it definitely will be positive for infinite number of games. Yeah, I don't like this either, but I don' t have anything better.

S = N + N^2 * (1-N) + N^3 * (1-N)^2 * 2 + N^4 * (1-N)^3 * 5 + N^5 * (1-N)^4 * 14 + ...

S * (1-N) = N * (1-N) + N^2 * (1-N)^2 + N^3 * (1-N)^3 * 2 + N^4 * (1-N)^4 * 5 + N^5 * (1-N)^5 * 14 + ...

S * (1-N) / N = (1-N) + N * (1-N)^2 + N^2 * (1-N)^3 * 2 + N^3 * (1-N)^4 * 5 + N^4 * (1-N)^5 * 14 + ...

(1-N) + N * (1-N)^2 + N^2 * (1-N)^3 * 2 + N^3 * (1-N)^4 * 5 + N^4 * (1-N)^5 * 14 + ... is equal to S, but with N replaced by 1-N (and vice versa).

Since 0<N<1/2, 1/2<(1-N)<1

By the law of large numbers (ugh) this means that (1-N) + N * (1-N)^2 + N^2 * (1-N)^3 * 2 + N^3 * (1-N)^4 * 5 + N^4 * (1-N)^5 * 14 + ... = 1

Then, for 0<N<1/2 ,

S * (1-N) / N = 1

S = N/(1-N)

M = 1 - S

M = 1 - N/(1-N)

EDIT: typo fix.

_________________
nice quotes from this forum


Last edited by UselessCommon on Mon Mar 19, 2018 12:38 am, edited 3 times in total.

Like this post
Top
 Profile  
 
 Post subject: Re: Statistics question
PostPosted: Sun Mar 18, 2018 10:12 am 
Offline
YMtC Champ '11
YMtC Pro Tour Champion
YMtC Idol Winner
User avatar

Joined: Sep 23, 2013
Posts: 9095
Preferred Pronoun Set: he/him/my/mine/himself
I won't claim to be a math guy. I did well in the respective classes I took, but those are limited in scope (so a lot of this is a bit beyond me.)
But your method is basically, if I understand it correctly, that for outcome A or B, you defined F(n) = P(A > B occurrences in n attempts), and then mapped those values as an infinite sequence, which is convergent? (also I'm not 100% on the lingo but I think that's correct-ish.)

_________________
In the custody of febb since 12.05.16
[Warchief] Custom EDH Project

you're like the kind of person who would cast Necropotence irl


Like this post
Top
 Profile  
 
 Post subject: Re: Statistics question
PostPosted: Sun Mar 18, 2018 11:53 am 
Offline
Member
User avatar

Joined: Sep 28, 2016
Posts: 2276
Preferred Pronoun Set: he/him/his/his/himself
You are almost correct, if I correctly understand your comment. (Your math lingo is pretty confusing to me, but it may partly be language barrier. I'm also not brilliant in it)
However,
1) n in my funciton is not the numer of attampts, it's a number of succeeded attempts AND also the number of the element in the infinite sequence. The number of attampts is 2n - 1.
2) "occurences in attempts" sounds like a choice funciton. I am not using it, because it doesn't account for order of successes, which is very important here, because, say, W-L-W sequence suggests the ratio is right for the n=2, but since the very first game is a win, this sequence of results falls into n=1, and second and third members in it are irrelevant . I am using Catalan's numbers, that account for order.

TL, DR: I found a way to describe a probability of every possible way to get a positive win/loss ratio for the first time, and then I made an infinite sum out of those probabilities, and it indeed happened to converge.

_________________
nice quotes from this forum


Like this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group