# Random PW Math (Warning: very random and might be boring to some people)

#### アイドンノウくん

• Old Player
So I was bored; and decided to do some math about pw. It happens to be a beautiful result.
Recently, some people are asking to lower the proc. rate of spirit blackhole on forum; and the topic interests me.
So I was thinking about a random problem, which is not really related to the topic to most of the people here. Hence, this thread was created in this section.
And, the result I got is surprisingly beautiful (to me, at least). So, I decided to share it.
Here it is:

Suppose the number of purge hit, X follows a binomial distribution(N,p) and N follows a Geometric distribution(p), where N = number of total hits, p = proc. rate of purge, and p+q=1.

Then, the expected value of X = E[ E(X l N) ] ;
and the variance of X = Var[ E(X l N) ] + E[ Var(X l N) ]                  (look it up online for more info.)

Facts:
If A~Bin(n,p), then E(A)=np and Var(A)=npq  ;
If B~Geo(p), then E(B)=1/p and Var(B)=q/(p^2) .

Thus:
E(X) = E[ E(X l N) ]
= p/p = 1

Var(X) = Var[ E(X l N) ] + E[ Var(X l N) ]
= (p^2)*q/(p^2) + pq/p
= q+q
= 2q

It turns out that the expected value of X is a constant, 1 ; and the variance of X is 2q or 2*(1-p), which is unexpectedly beautiful.

Taking spirit blackhole for example, the proc. rate is 5%. So:
E(X) = 1 and Var(X) = 2*0.95 =1.9

As you can see, I must be so bored to type out all this craps which I doubt anyone would understand or even bother to read. LMAO. Anyway, if you have made it here, then you are really good.

#### Ormin

• Member
Glad to hear that you find beauty in it.
To me it all sounds pretty normal, nothing exciting.

#### Noki

• Forum Veteran

#### Theo

• Mexican Burrito
• Eat the booty like groceries
• Characters: Teeo
*Mindblown*
Teeo - 124 Seeker

#### Anine ❤

• Member
• Faction: Tyrants
...I don't understand. But still really cool.

Makes me wish I paid attention in high school.

#### Esok

• Tobi ★
• As i live all will die. ★
• Characters: Esok ★
• Faction: Xpendable ★
Currently Inactive ★

#### Artiom

• Entelechy
• Let the games begin! The mysteries disappear and life stands explained.
• Characters: Fobas/Enfield
• Faction: Artifex/Tyrants
Lol, wanna do the maths exam for me ?

#### Bre

• ♥ Jessus Christ
• ♦ Wink Wank ♦
• Faction: 0FkGiven
So I was bored; and decided to do some math about pw. It happens to be a beautiful result.
Recently, some people are asking to lower the proc. rate of spirit blackhole on forum; and the topic interests me.
So I was thinking about a random problem, which is not really related to the topic to most of the people here. Hence, this thread was created in this section.
And, the result I got is surprisingly beautiful (to me, at least). So, I decided to share it.
Here it is:

Suppose the number of purge hit, X follows a binomial distribution(N,p) and N follows a Geometric distribution(p), where N = number of total hits, p = proc. rate of purge, and p+q=1.

Then, the expected value of X = E[ E(X l N) ] ;
and the variance of X = Var[ E(X l N) ] + E[ Var(X l N) ]                  (look it up online for more info.)

Facts:
If A~Bin(n,p), then E(A)=np and Var(A)=npq  ;
If B~Geo(p), then E(B)=1/p and Var(B)=q/(p^2) .

Thus:
E(X) = E[ E(X l N) ]
= p/p = 1

Var(X) = Var[ E(X l N) ] + E[ Var(X l N) ]
= (p^2)*q/(p^2) + pq/p
= q+q
= 2q

It turns out that the expected value of X is a constant, 1 ; and the variance of X is 2q or 2*(1-p), which is unexpectedly beautiful.

Taking spirit blackhole for example, the proc. rate is 5%. So:
E(X) = 1 and Var(X) = 2*0.95 =1.9

As you can see, I must be so bored to type out all this craps which I doubt anyone would understand or even bother to read. LMAO. Anyway, if you have made it here, then you are really good.

#### アイドンノウくん

• Old Player
Glad to hear that you find beauty in it.
To me it all sounds pretty normal, nothing exciting.
The reason I find it beautiful is because I didn't know that such a mixed distribution has such a nice and simple result until I did the proof. The expected value seems pretty intuitive to me, but the variance is definitely something I didn't expect to see.

#### アイドンノウくん

• Old Player
...I don't understand. But still really cool.

Makes me wish I paid attention in high school.
I know how you feel. We always regret for something that we did/didn't do in the past.

#### アイドンノウくん

• Old Player
Lol, wanna do the maths exam for me ?
I could if it's just addition and subtraction.

#### PedroSner

• Tyrants slayer
• Characters: PedroSnore/ Snerd