How is the probability of winning a block calculated from the difficulty?


If the current difficulty is D, then the target hash (the value below which block hashes must go) is:

0x00000000FFFF0000000000000000000000000000000000000000000000000000 / D

(by definition of difficulty, which is a fraction of the maximum target), or otherwise put, the number of valid hashes is:

65535 * 2208 / D

Which means that the ratio of all hashes over valid hashes would be:

2256 / (65535 * 2208 / D) = D * 248 / 65535 = D * 4295032833

Which, at the current (January 2017) difficulty of D = 392963262344.3704 means that one hash in

392963262344.3704 * 4295032833 = 1687790113931869416948

results in a valid block, or each attempt has a chance of

1 / 1687790113931869416948 = 0.000000000000000000059...

0 0

As I understand your question it has two parts. One is how to calculate an approximation of someone's hash rate externally, like from a server or proxy that can see their mining results but not their actual hashing process or hash rate. The other part is how to calculate the probability that a block would be found after a given amount of work, or a given amount of time and hash rate.

I will write the formulas as javascript code, with X to the power of Y written as Math.pow(X, Y). You could run them in your browser by typing them into the address bar like for example javascript:alert((Math.pow(2, 32) * 27939) / 600).

Approximation of hash rate:

With an arbitrary target, count one share at difficulty X the same as X shares at difficulty 1. That's how pools deal with variable difficulty.

hashrate = (Math.pow(2, 32) * shares) / seconds-elapsed

An average of one share (at difficulty 1) is found for every Math.pow(2,32) hashes. This is only an average...

0 0

The Bitcoin difficulty started at 1 (and can never go below that). Then for every 2016 blocks that are found, the timestamps of the blocks are compared to find out how much time it took to find 2016 blocks, call it T. We want 2016 blocks to take 2 weeks, so if T is different, we multiply the difficulty by (2 weeks / T) - this way, if the hashrate continues the way it was, it will now take 2 weeks to find 2016 blocks.

For example, if it took only 10 days it means difficulty is too low and thus will be increased by 40%.

The difficulty can increase or decrease depending on whether it took less or more than 2 weeks to find 2016 blocks. Generally, the difficulty will decrease after the network hashrate drops.

If the correction factor is greater than 4 (or less than 1/4), then 4 or 1/4 are used instead, to prevent the change to be too abrupt.

There is a bug in the implementation, due to which the calculation is based on the time to find the last 2015 blocks...

0 0

Block weight derives from difficulty

The difficulty encodes how likely one try is at producing a valid block. Let's say the difficulty starts out at 1%, i.e. one try in one hundred should succeed and we'll call this a difficulty of 100.
With a 1% chance of success, you could succeed with your first try, but it could also take you 200 tries. However, it wasn't harder or easier to succeed because you were lucky or unlucky! So, however many tries actually took place until the block was found, the block will have a weight of "100 difficulty" when it is found.

How does Difficulty change?

Obviously, when people add more computing power to the network, more tries per second will be performed. Since each try has a chance of succeeding (e.g. 1% from above), more computing power will cause a block to be found quicker. This is still a probabilistic process, so sometimes it might be slower than the previous average time, but the new average time will be lower.

0 0

Difficulty is a measure of how difficult it is to find a new block. It is a human-friendly way of expressing the target.

How often does the difficulty change?

Every 2016 blocks.

What is the formula for difficulty?

Difficulty can be computed from the current target (which is a 256-bit number) as follows:

difficulty = 0xFFFF * 2**208 / target

How is difficulty stored in blocks?

Each block stores a packed representation (called "Bits") for its actual hexadecimal target. The target can be derived from it via a predefined formula. For example, if the packed target in the block is 0x1b0404cb, the hexadecimal target is

0x0404cb * 2**(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000

Note that the 0x0404cb value is a signed value in this format. The largest legal value for this field is 0x7fffff. To make a larger value you must shift it down one full byte. Also 0x008000 is the smallest positive valid...

0 0

Because you can also win prizes if you have less than 6 matching numbers, this section will show you how to calculate the probability if there are x matches to the winning set of numbers.

First, we need to find the number of way to choose x winning numbers from the set and multiply it by the number of ways to choose the losing numbers for the remaining 6-x numbers. Consider the number of ways to choose x winning numbers. Because there are only 6 possible winning numbers, in essence, we are only choosing x from a pool of 6. And so, because order does not matter, we get C(6, x).

Next, we consider the number of ways to choose the remaining 6-x balls from the pool of losing numbers. Because 6 are winning numbers, we have 55 - 6 = 49 balls to choose the losing numbers from. So, the number of possibilities for choosing a losing ball can be obtained from C(49, 6 - x). Again, order does not matter here.

So, in order to calculate the probability of winning with x...

0 0

What is bitcoin difficulty?

Bitcoin difficulty is an estimate about how difficult it is to mine (find) a new bitcoin block. Bitcoin mining has two main purposes. One is adding transactions to the bitcoin block chain. The other purpose is to create new bitcoins.

The total number of bitcoins that will ever be mined is limited to 21 million. Moreover, the bitcoin protocol determines a time horizon over which the bitcoins will be created. This is done to limit the supply of bitcoins. A new block is mined every 10 minutes. The number of bitcoins in one block is currently BTC 25 and is halved every 210,000 blocks or approximately every four years.

If everybody could easily mine new bitcoins, inflation would be the result. Bitcoin difficulty exists to ensure a limited bitcoin supply. This does not mean there could be no inflation for bitcoin. Activities like bitcoin lending can increase the bitcoin money supply. But the main...

0 0

This article is a short journey to the theme ‘risk management’ as we are often asked…

How high should be a starting bank?
Is 5,000 units enough?

Well, there is no standard answer to this question. It all depends on the individual strategy.

Image: Sergey Novikov (Shutterstock)

However, what is possible, is to calculate bank fluctuations (i.e. winning and losing sequences).

With the help of knowing the best and worst case scenarios you can determine the ideal starting bank for any betting system of your choice.

At the end of the article you will find a few useful exercises to practise, with the solutions available as a free download to all of you who would like them.

Length of Winning and Losing Streaks

It stands to reason that the smaller the probability of an event occurring (i.e. higher odds), the longer the likely losing streak will be (in between winning bets).

However, the big question is how often and for how long...

0 0
Understanding Probability: How to Calculate the Number of Outcomes

Key Terms

o Counting problem

o Replacement

o Permutation

o Combination


o Understand how to relate counting of outcomes to probability

o Calculate the number of outcomes of a random experiment using permutations and combinations

o Know how sampling with or without replacement affects a counting problem

When solving more complicated probability problems, we may need to consider series of random experiments or experiments that involve several different aspects, such as drawing two cards from a deck or rolling several dice. In such cases, the ability to calculate relative frequencies (and thus probabilities) requires counting the number of possible outcomes of the experiment. Although counting the number of possible outcomes for simple random experiments, such as the flip of a coin (heads or tails), may be quite...

0 0
0 0

The UK’s National Lottery recently added more balls to its Lotto machines, meaning that the chances of winning the jackpot are smaller. Has this ruined the fun? Do the lower odds mean that the vast majority of weeks are likely to go by without a big winner, just as we recently saw with 14 consecutive rollovers?

Working out your chance of winning the Lotto jackpot is not difficult. Let’s start with the old rules. You need to match all of the first six balls drawn out of the machine. There are 49 numbers to choose from, and you have six of these on your ticket. Therefore, when the first ball is drawn, you have a six in 49 chance that it matches one of yours. Cross that one off.

There are now 48 balls left in the machine, and five numbers on your ticket. So when the second ball rattles to the bottom of the chute, there is a five in 48 chance that it matches one of yours. If you match the first two then, for the third ball, you have a four in 47 chance; for the fourth,...

0 0

Total noob here, I'm just guessing!

5 Ether per block during frontier apparantly. The calculation below is ignoring uncles, it's just for the static block reward.

The probability of mining a block should be uniformly
yourHashrate / totalHashrate.
Since a block apparantly is mined every minute (the difficulty is adjusted thereto)
etherPerDay = 24*60*5.
So after a day you can expect on average yourHashrate / totalHashrate * etherPerDay.

The stats currently state 3.1 GH/s as the total hashrate.
Assuming yourHashrate = 25 MH/s that yields
24*60*5*(25e6/3.1e9) = 58 Ether / day

Then again, I'd estimate the total hashrate to be maybe a hundred times higher when more miners run their rigs.
So a more careful estimate would be
24*60*5*(25e6/3.1e11) = 0.58 Ether / day.

Anything between (and outside of) these values is possible

Still open is the question of how likely it actually is to mine at...

0 0
0 0

What is Bitcoin Mining Difficulty?

Visualize and Download High-Resolution Infographic

The Computationally-Difficult Problem

Bitcoin mining a block is difficult because the SHA-256 hash of a block's header must be lower than or equal to the target in order for the block to be accepted by the network.

This problem can be simplified for explanation purposes: The hash of a block must start with a certain number of zeros. The probability of calculating a hash that starts with many zeros is very low, therefore many attempts must be made. In order to generate a new hash each round, a nonce is incremented. This is based on the hashcash function.

The Bitcoin Network Difficulty Metric

The Bitcoin network difficulty is the measure of how difficult it is to find a new block compared to the easiest it can ever be. It is recalculated every 2016 blocks to a value such that the previous 2016 blocks would have been generated in exactly two weeks had everyone...

0 0

Statistics and Probability is a fundamental knowledge that should be inside each Software Engineer, and here I will show you some of its wonders.
Some of you are already saying “hi” and posting pictures to boost your possibility to win the giveaway, but, how will it improve your chances? and how will I calculate? Keep reading to find out.

In probability the chance of an event to happen is measured between 0 and 1, with 0 being an impossible occurrence (it will never happen) and 1 being an occurrence that will always happen, anything in between is said to be the probability of an occurrence to happen, the closer to one the more chances it has to happen.

It’s all pretty basic stuff, but lets put it in the context of our giveaway.

Let’s imagine for a second that the giveaway ended and there’s 200 participants, this means that if you were to win you have to be randomly picked out of this crowd of 200, so you have a one out of 200 chances of winning,...

0 0
Theory of Probability, Introduction, Formulas, Software

Introducing Ion Saliu's Paradox of N Trials

By Ion Saliu, Founder of Probability Theory of Life

I. The Best Introduction to Theory of Probability
II. The Logical Foundation of Probability Theory
III. Calculating the Essential Elements of Probability (Odds)
IV. Precise Definition of the Probability Events
V. Probability of Binomial Distribution
VI. Probability of Hypergeometric Distribution
VII. Probability of Combined Events
VIII. Probability (Odds) of Inseparable Events, Single Trial
IX. Probability (Odds) of Separable Events, Multiple Trials
X. Nothing without a Degree of Certainty — Ion Saliu's Paradox
XI. Reversed Ion Saliu's Paradox
XII. The Best Tools to Calculate and Verify Probabilities: Software
XIII. Resources in Theory of Probability, Mathematics, Statistics, Combinatorics, Software

1. Necessarily the...

0 0
Probabilities in the Game of Monopoly®

Probabilities in the Game of Monopoly®

Table of Contents

I recently saw an article in Scientific American (the April 1996 issue with additional information in the August 1996 and April 1997 issues) that discussed the probabilities of landing on the various squares in the game of Monopoly®. They used a simplified model of the game without considering the effects of the Chance and Community Chest cards or of the various ways of being sent to jail.

I was intrigued enough with this problem that I started working on trying to find the probabilities for landing on the different squares with all of the rules taken into account. I ran into some interesting problems but finally came up with the right answers, which you will find here along with some other useful derived data. Incidentally, I'm not much of a Monopoly® player myself, but I've always enjoyed interesting problems involving probability and...

0 0

by Mark Eastman, M.D. and Chuck Missler

from TriunityReport Website


Part 1

Stanley Miller's Bombshell

In 1953 a graduate student named Stanley Miller set out to verify the Oparin-Haldane-Urey hypothesis with a simple but elegant experiment.1 The results of this experiment have been taught to every high school and college biology student for nearly four decades.

Using a system of glass flasks, Miller attempted to simulate the early atmospheric conditions. He passed a mixture of boiling water, ammonia, methane and hydrogen through an electrical spark discharge. At the bottom of the apparatus was a trap to capture any molecules made by the reaction. This trap prevented the newly-formed chemicals from being destroyed by the next spark. Eventually, Miller was able to produce a mixture containing very simple amino acids, the...

0 0