Proof of Work figures

I am focused on understanding Proof of Work (PoW) vs Proof of Stake (PoS).

One idea I liked is that we can see the mining of a block as a lottery of probability P, where I buy a ticket of cost C using my hardware and electricity, to obtain a reward R.

Since R should be simple to obtain (the value in ETH of the reward times value of ether in fiat), I want to set up figures for P and C.

What is the simplest way to reach these figures? Starting of course with Hash Rate and Total Difficulty. What are the most popular techniques to arrive to those values?

• In PoW, I answer myself: You get a `target` which is `2 ** 256 / D` and you produce a hash which lives in the interval `[0, 2 ** 256]`, and is supposed to start from a `nonce`, which are randomly uniformed distributed. Your `p` at any moment of finding a `hash` lesser than the `target` is `1 / D`, that is your favorable cases against all the cases. It follows that as Difficulty increases, your odds decrease. Jan 30, 2017 at 8:24
• Now the probability for the network on finding at least one block, given a difficulty `D` is a different beast: Given that we defined that `p = 1 / D`, we can say that `P(B > 1) = 1 - P(B = 0) = 1 - (1 - p)^H`. With `H` being the amount of hashes we are able to produce at a certain amount of time. Jan 30, 2017 at 13:41