Finding the Entropy of a random experiment with probability of $\frac{1}{3}$
Your formula is totally inapplicable in computer randomness harvesting.  I think that people use it because it's easy to write down.  Even then, it's not really usable - what's i exactly?  For any non trivial application, there are correlations.  Try using this formula for the English language. No you can't say there are just 26 letters as they are hugely correlated. There are two, three, four letter combinations, and then there are words and sentences that have lexological and grammatical structure. I don't know what you do with full stops.  The entropy rate will very much depend on who wrote the words and about what.  If you try the Shannon formula in it's most simplistic typical use case, "1111111111...0000000000..." has exactly 1 bit/bit of entropy. Clearly it doesn't.

Entropy harvesting by a computer kernel consists of sucking up hardware device interrupts including keyboard presses.  Non of this is uncorrelated.  The official cryptographic term is non IID (non independent and identically distributed). And for measurement of such non IID entropy,  there is no set standard. The best we have currently is either direct compression, or the NIST SP800-90B_Entropy Assessment tools (which also include compression as one of the tests). They may have been written by a chap using up his spare time.

Is von Neumann&#39;s randomness in sin quote no longer applicable? is a currently open question  featuring such entropy measurements.  So essentially coin toss randomness is completely different to operating system randomness.