### A quick Probability math intro using the random node list on E2.

#### Or "should I be surprised to see my node?"

Please Note:*Key Probability words (words that give us instructions) are in caps and that a year at A Level just got condensed into this write up.*

**But First the basic rule of probability:**

Number of ways it can happen
P = ------------------------------
Number of possible outcomes

1 is a dead cert while 0 is Impossible, most probabilities are in that range and are naturally expressed as decimals. All other forms are for reading purposes only.

So if you flip a coin

1
P(Heads) = ---
2

1/2 = 50% = ** 0.5 ** (50/50 in layman's terms).

We shall now examine the probability of any given node showing AT LEAST ONCE in the list.

Some Variable names for formula purposes

e = number of nodes in e2 (e = 735207 for tie in purposes)

l = number of nodes in random nodes nodelet (13)

p = probability of getting any given node show in the nodelet

At the most basic level:

l 13
P = --- = ------
e 735207

This is not strictly true the exact result is a little more fiddly. The above example
assumes that the number of spaces to fill (13) does not change and that the population to draw from is not
diminished. This assumption can only be made if the sample is taken from an enormous
(read assume infinite) population.

If we want one or the other we add thus with the coin P(HEADS) + P(TAILS) = 1/2 + 1/2 = 1

So the true value for our maths is

13 12 11 10 9 8 7 6 5 4 3 2 1
-- + --- + --- + --- + --- + --- + --- + --- + --- + --- + ---- + ---- + ----
e e-1 e-2 e-3 e-4 e-5 e-6 e-7 e-8 e-9 e-10 e-11 e-12

or

l+(l-1)+(l-2)...+(l-(l-1))
-------------------------------
le - ( (l-1)+(l-2)..(l-(l-1)) )

if l = 13 then l+(l-1)+(l-2)...+(l-(l-1)) = 91

*So we can say:*

91
-------------
13e - (91-13)

This gives us a simple enough formula for future calculations when the value of
** e** changes as it will have done as I am using a value from a write up already
present.

Given e = 735207:

91 91 91
------------------- = ------------- = -------
13*735207 - (91-13) 9557691 - 78 9557613

Which my calculator gives as: 9.52120576549814268478960175516627e-6.

Which is: 0.00000952120576549814268478960175516627

Approximately: 0.00000952

This number represents the probability that any given node will show in the first slot
OR the second OR the third OR... etc

If we had 451 nodes to our name we could add the number to itself 451 times and get the
probability for any of the 451 nodes showing at least once in any of the 13
locations on the random node nodelet. (or for speed we can multiply)

0.00429406380023966235084011039157987 (451 nodes)

Approximately: 0.0043

That is better than 4/1000 (1/250) chance of seeing at least one of your nodes every time you
refresh your page, so it's not nearly as surprising as you would at first think. For the interested: the odds
are still 1/250 no matter how many times you load the page this is because each random
occurrence (theoretically) in no way effects the next. The oft stated misunderstanding
that "if you refresh 249 times the next one *must* be yours" is meaningless as the number 1/250 means that given infinite refreshes 1/250 would contain a required node (one of the 451).

The probability of seeing your node AND then seeing your node again is just slightly greater than: 0.00001843898, but each occurence has an indipendant 1/250 chance. Probability's always fun!

Thanks to

Taliesin's Muse for the typo spotting.