Bitcoin Forum
June 23, 2018, 10:37:17 PM
 News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 Home Help Search Donate Login Register
 Pages: [1]
 Author Topic: My theory of shares by volume vs. speed  (Read 2373 times)
cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 27, 2012, 08:20:04 AM

Please don't judge on my math: (irony: I'm a math minor and never taken statistics)

Well here goes:

Given: 1 share = 1/(2^32) hashes

Group A:
10 GPU's producing 100 Mh/s each
Total: 1 Gh/s

Group B:
1 GPU Producing 1 Gh/s*
Total: 1 Gh/s

*Disclamer: THIS IS THEORY ONLY

Prove: Mining in a proportional pool, you will benefit more from one gpu providing maximum hashing speed, vs multiple cards hashing at slower speeds.

A:
10 Gpu's mining @ 100 Mh/s simultaneously will provide roughly 1 share every 42.9 seconds.
((2^32) hashes / 1 share) * (1 s / 100E6 hashes) = 42.94 s/share

B: 1 Gpu mining @ 1 Gh/s will provide roughly 1 share every 4.29 seconds
((2^32) hashes / 1 share) * (1 s / 1E9 hashes) = 4.29 s/share

ALL POOLS USE A NON-FEE PROPORTIONAL METHOD
Pool has a constant 1 Th/s collective speed.
Scenario 1: (extreme case)
Pool finds a block in 30 seconds.
Total shares: (1 share / (2^32) hashes) * (1E12 hashes / 1 s) * 30 s = 6,980 shares (3 sig figs)

A:
Shares by you: (1 share / 42.9 s) * 30 s = 0.699 shares / GPU = 0 shares
Payout: ( 0 shares / 6980 shares ) * 50 BTC = 0 BTC

B:
Shares by you: (1 share / 4.29 s)  * 30 s = 6.99 shares (tough luck) = 6 shares
Payout: ( 6 shares / 6980 shares ) * 50 BTC = 0.430 BTC

Scenario 2:
Pool finds a block in 180 seconds.
Total shares: (1 share / (2^32) hashes) * (1E12 hashes / 1 s) * 180 s = 41,900 shares (3 sig figs)

A:
Shares by you: (1 share / 42.9 s) * 180 s = 4.196 shares / GPU = 40 shares
Payout: ( 40 shares / 41900 shares ) * 50 BTC = 0.477 BTC

B:
Shares by you: (1 share / 4.29 s) * 180 s= 41.95 shares / GPU = 41 shares
Payout: ( 41 shares / 41900 shares ) * 50 BTC = 0.489 BTC

Scenario 3:
Pool finds a block in 3600 seconds.
Total shares: (1 share / (2^32) hashes) * (1E12 hashes / 1 s) * 3600 s =  838,000 shares (3 sig figs)

A:
Shares by you: (1 share / 42.9 s) * 3600 s = 83.9 shares / GPU = 830 shares
Payout: ( 830 shares / 838000 shares ) * 50 BTC = 0.495 BTC

B:
Shares by you: (1 share / 4.29 s) * 3600 s = 839 shares / GPU = 839 shares
Payout: ( 839 shares / 838000 shares ) * 50 BTC = 0.506 BTC

In conclusion:

Stated by my data, the highest hash rate obtainable by one card vs multiple smaller cards will almost always yield more BTC over time.

DISCLAIMER:  This is a lottery.  You can get get a share the first hash you do with any card.  This data represents results over a large period of time.

This is a picture of the results in an excel spreadsheet:

This can be related to 5870's vs 5970's.

~400 Mh/s to ~350 Mh/s
This theory is also in favor of the BFL 850 Mh/s miner.  Go figure.

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
1529793437
Hero Member

Offline

Posts: 1529793437

Ignore
 1529793437

1529793437
 Report to moderator
1529793437
Hero Member

Offline

Posts: 1529793437

Ignore
 1529793437

1529793437
 Report to moderator
1529793437
Hero Member

Offline

Posts: 1529793437

Ignore
 1529793437

1529793437
 Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1529793437
Hero Member

Offline

Posts: 1529793437

Ignore
 1529793437

1529793437
 Report to moderator
1529793437
Hero Member

Offline

Posts: 1529793437

Ignore
 1529793437

1529793437
 Report to moderator
cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 27, 2012, 09:14:58 PM

127 views and 0 replies? o.o

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218
Merit: 1004

Gerald Davis

 February 27, 2012, 09:17:23 PM

Junk math is junk math.  Not much to say.

You say "don't judge the math" and then provide a nonsense mathematical proof.

Your error comes from the fact that you think you get 1 share ever 2^32 hashes you don't.

10GH/s on a 3600 sec block = 36 trillion hashes.
1 GH/s on a 3600 sec block = 3.6 trillion hashes.

Outside of variance (which favors neither small or large miners) your reward is directly related to the number of hashes.

Shares are found aproximately once ever 2^32 hashes but not exactly.  You simply took the number of shares as hashes / 2^32 round down and thus obviously the larger # is going to have less of a rounding error.

That doesn't exist in reality.

Quote
Scenario 3:
Pool finds a block in 3600 seconds.
Total shares: (1 share / (2^32) hashes) * (1E12 hashes / 1 s) * 3600 s =  838,000 shares (3 sig figs)

A:
Shares by you: (1 share / 42.9 s) * 3600 s = 83.9 shares / GPU = 830 shares
Payout: ( 830 shares / 838000 shares ) * 50 BTC = 0.495 BTC

B:
Shares by you: (1 share / 4.29 s) * 3600 s = 839 shares / GPU = 839 shares
Payout: ( 839 shares / 838000 shares ) * 50 BTC = 0.506 BTC

A should be 839 shares.  Wait you say I can't find 83.9 shares. Right?  But you will find on AVERAGE 83.9 shares per GPU per 3600 sec block.

Sometimes it will be 83, sometimes 84 (and actually sometimes 80, 82, 78, 91, 94, 96, 102, and occassionaly 64) but in the long run it will work out to 83.9 shares per 3600 sec block per GH/s.

An example to illustrate your logical flaw:
Say we mined CoinCoins by flipping a coin.  Heads you get a share, tails you don't.

You have a 10x low powered coin flipper which can only do 1 flip per minute.
Say all rounds are 1 minute each.  Each of your 10 flippers will perform 1 flip each.  The expected value is 0.5 coins.  By your logic that rounds down to 0.  Thus your net return is 10 * 0 = 0.  Thus even after a quadrillion rounds you will still have 0 shares.

I have a single high powered coin flipper which can do 10 flips per minute.
In a 1 minute block it will perform 10 flips.  The expected value is 5 coins.  5.0 rounds down to 5.0.  In 1 quadrillion rounds I will have 5 quadrillion shares.

Obviously we can test this by performing flips and see that it isn't true.  In each individual round your 10 flippers will earn either 0 shares or 1 share.  The 10 combined thus can earn anywhere from 0 to 10 shares per round but over the long run (hundreds of rounds) both your and my flip rigs will earn ~5 shares per round.
cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 27, 2012, 10:34:58 PM

Your logic is correct, but the reason for the round down is because you can't submit 1/9th of a share.  At that period of time *if you average 1 share / 2^32 hashes* your share would not be submitted in time.  The idea behind this, the chances are, with more firepower, you will find shares more quickly.

Lets say a block is found 30 seconds in the future:

if there is 30 seconds left and all of your cards just submitted a share, they're beginning to work on new shares.

A: The cards average 42.9 seconds per share, so what are the odds 5 of them find a share and submit it?

B: Cards average 4.29 seconds per share.  Let's round down to 6 shares submitted.  Even if one share takes 8 seconds to find, you're still submitting 1 more than you would have in A.

This takes advantage of the rounding errors and can be seen in extreme cases such as 2x 5870's vs 1x BFL single.

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 27, 2012, 10:38:19 PM

You have a 10x low powered coin flipper which can only do 1 flip per minute.
Say all rounds are 1 minute each.  Each of your 10 flippers will perform 1 flip each.  The expected value is 0.5 coins.  By your logic that rounds down to 0.  Thus your net return is 10 * 0 = 0.  Thus even after a quadrillion rounds you will still have 0 shares.

I have a single high powered coin flipper which can do 10 flips per minute.
In a 1 minute block it will perform 10 flips.  The expected value is 5 coins.  5.0 rounds down to 5.0.  In 1 quadrillion rounds I will have 5 quadrillion shares.

Now lets say you have 30 seconds till the round ends.  Not all rounds end as you submit your shares.

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218
Merit: 1004

Gerald Davis

 February 27, 2012, 10:55:16 PM

THERE IS NO ROUNDING.

If a card finds 2.5 shares per round.  Sometimes it will find 3, sometimes 2 sometime 9 sometimes 0.  ON AVERAGE it will find 2.5.

You do get the concept that you don't find 1 share AFTER 2^32 hashes.  You find on average one share every 2^32.

IF it worked like the following then your right you would truncate as any partially incomplete nonce range would be "lost".
hash 0
hash 1
hash 2
hash 3
...
hash 2^32 - 1
GET SHARE
Submit.

However isn't how mining works.  A share is an arbitrary distinction and so is making the nonce range 2^32.  In hindsight it likely would have been better to make it 2^64 and then no miner would ever finish a nonce range before LP (minimizing pool to miner communication).

Every hash has a 1 in 1376302.2678864 chance of being a difficulty 1 share.  You don't work towards a hash.  Each hash is independent.  It either is worth a share, solves a block (and is worth a share) or it is worthless.  They are like lottery tickets with a chance of winning being 1 in 2^32.  On average you will find one winner every ~4 billion shares.

If you process 1 quadrillion hashes (roughly 12 days at 1 GH/s) you will find ~232,831 shares. It doesn't matter how slow or fast you are.  If you are running at 10 GH/s you will process 1 quadrillion hashes in ~1.2 days.   If you are running at 1 MH/s it will take you 12,000 days but after processing 1 quadrillion hashes you will have ~ 232,831 shares (+/- a few due to variance).

Last way to look at it.  You don't work toward a share you either "win" or you "lose".

There is a lottery game in which 1 in 5 tickets win.

If you buy 6 tickets you will win 1.2 times.  Since you can't win 0.2 times you only win once.
Thus
1 ticket bought = 0 wins
2 tickets bought = 0 wins
3 tickets bought = 0 wins
4 tickets bought = 0 wins
5 tickets bought = 1 wins <- obviously the optimum choice.
6 tickets bought = 1 wins
7 tickets bought = 1 wins
8 tickets bought = 1 wins

"Due to the truncating effect you should only buy tickets in increments of 5"  People who have larger budget and can buy 5 tickets win more".  Does that sound silly?  You are saying the exact same thing because each hash is independent of other hashes and has an equal chance of winning (share).

cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 27, 2012, 11:37:00 PM

Everything I have said in this thread has been theory.  I've stated that it's an estimate.  If you read the last part of my first post, I touch upon the randomness of the subject.  But as more and more shares are found (limit as shares->infinity) it will converge at 1/2^32.  Plain and simple.

I understand what you are saying, but that would only be true as the number of shares/round -> infinity.

What I'm stating is purely theoretical.

The real life model of this analysis will obviously depend on randomness.

In some cases it will win, in some cases it will lose.  But due to the evidence I've stated about submitting shares,  The single more powerful card will almost always submit between 0 and (1cardhash/10cardhash)) hashes per round if shares->infinity.  In most cases this is negligible, but in cases where it takes 30 seconds to solve a block, those extra shares provide the extra income.

What are the odds of a card taking an average of 42.9 seconds to submit a share, submitting one in < 4.29 seconds?

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218
Merit: 1004

Gerald Davis

 February 27, 2012, 11:38:19 PM

You choose to remain uninformed.  There is a no reason nobody else wasted time on this thread and now I feel foolish for having done so.
cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 February 28, 2012, 12:13:22 AM

You choose to remain uninformed.  There is a no reason nobody else wasted time on this thread and now I feel foolish for having done so.

No reason to leave! Our debate was just getting heated!

This is probability and odds my friend.

Say you have 10 rounds:

A and B both get new work and round ends in 30 second.

Multiplication Rule 1:      When two events, A and B, are independent, the probability of both occurring is: P(A and B) = P(A) · P(B)

A: 42.9 s/share: Extrema: 10, if every card finds a share before 30 seconds.  Will average to ~0.7 shares / card.
1 share: 0.7^1 x 100%  70%
2 shares: 0.7^2 x 100% = 49% (70% chance on two cards)
3 shares: 0.7^3 x 100% = 34.3%
4 shares: 0.7^4 x 100% = 24.0%
5 shares: 0.7^5 x 100% = 16.8%
6 shares: 0.7^6 x 100% = 11.8%
7 shares: 0.7^7 x 100% = 8.23%
8 shares: 0.7^8 x 100% = 5.76%
9 shares: 0.7^9 x 100% = 4.03%
10 shares: 0.7^10 x 100% = 2.82%

*note: this does not repeat.  For one card to find 2 shares in that time is exponential growth.

B: 4.29 s/share: Extrema: 10 if it finds a share < 3 seconds every time.  Will average to ~7 sometimes 4 sometimes 10

In order for that gap to be filled A would have to have the same # of shares submitted as B.

It is almost certain that AT LEAST 6 shares will be found in 30 seconds.

 Shares78910 s4.293.753.333.00 P(i)0.9990.8740.7770.699 P(i)^n99.3%34.1%10.3%2.8%

Conclusion:
Given n trials of this:
If every trial ends 30 seconds after each card submits their hashes -
A: 70% of the time, the cluster will submit 1+ share.
49% of the time, the cluster will submit 2+ shares.
and so on.
B: 99.3% of the time, the cluster will submit 7+ shares
34.1% of the time, the cluster will submit 8+ shares
and so on.

As you see, the odds are against the single card submitting under 6 hashes in that allocated time.  Whereas the 10 card setup odds suggest that will happen 11.8% of the time.

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
eleuthria
Legendary

Offline

Activity: 1750
Merit: 1001

 February 28, 2012, 01:47:09 PM

Your flaw is trying to convert hash rate into an exact shares per time.  Like DeathAndTaxes stated, you can't round the decimals or you invalidate the results.

1 GH/s will mine shares equivalent to 1 GH/s worth of speed.  It doesn't matter if it's contained in 1 GPU, 10 GPUs, or 1000 CPUs.  The only "advantage" to having it in one miner is if your network connection is so terrible that having multiple miners worth of network activity increases your stale rate due to latency/packet loss.

RIP BTC Guild, April 2011 - June 2015
cpt_howdy
Member

Offline

Activity: 70
Merit: 10

 February 29, 2012, 11:04:29 PM

Reading this thread is like watching a climate denier 'debating' a climate scientist...
It's scary. A little ignorance goes a long, long way
Vbs
Hero Member

Offline

Activity: 504
Merit: 500

 March 02, 2012, 12:38:48 PM

Everything I have said in this thread has been theory.  I've stated that it's an estimate.  If you read the last part of my first post, I touch upon the randomness of the subject.  But as more and more shares are found (limit as shares->infinity) it will converge at 1/2^32.  Plain and simple.

Congrats! You found what the mean value converges to at infinity! Now, how about finding out what the variance value converges to at infinity??? Oh, wait...
wabber
Member

Offline

Activity: 85
Merit: 10

 March 08, 2012, 05:08:48 PM

Bitcoin mining is like playing the lottery and every !!hash!! is a ticket.
Let's say i buy 10 lottery tickets and in the household next to me live 10 people and everyone of them buys one ticket. The household of my neighbor now has obviously the same chance to win. That's pretty much your example with the 1GH/s card and the 10 100MH/s cards.

But there actually is this kind of effect with distributed hashing power:

Let's say i have 2000 CPUs and each of them needs 2hours for one hash.
You have 1CPU that needs 0.002h=7.2s for each hash.

That means that we have the same hashing power but I will never find a hash and therefore no block because i have to start all over again after ~10min when a new block comes out.

But that problem doesn't exist, because noone is hashing with such a CPU :/
And it's not related to your calculations which are just wrong.
Vbs
Hero Member

Offline

Activity: 504
Merit: 500

 March 12, 2012, 11:48:37 AM

Oh boy!

Hint: The variance is not zero!!!!
kjj
Legendary

Offline

Activity: 1302
Merit: 1001

 March 15, 2012, 05:02:45 AM

Bitcoin mining is like playing the lottery and every !!hash!! is a ticket.
Let's say i buy 10 lottery tickets and in the household next to me live 10 people and everyone of them buys one ticket. The household of my neighbor now has obviously the same chance to win. That's pretty much your example with the 1GH/s card and the 10 100MH/s cards.

But there actually is this kind of effect with distributed hashing power:

Let's say i have 2000 CPUs and each of them needs 2hours for one hash.
You have 1CPU that needs 0.002h=7.2s for each hash.

That means that we have the same hashing power but I will never find a hash and therefore no block because i have to start all over again after ~10min when a new block comes out.

But that problem doesn't exist, because noone is hashing with such a CPU :/
And it's not related to your calculations which are just wrong.

Actually, your calculations are just wrong too.  There is no progress.  You are no more likely to find a block after 10 minutes than you were after 10 seconds, or 1.  In the long run, you will have nearly identical performance.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218
Merit: 1004

Gerald Davis

 March 15, 2012, 05:04:41 AM

His calculation is right although very extreme.  Notice he says a SINGLE HASH time of 2 hours.  If one unit of work can't be completed before the LP he will never be able to get a lottery ticket before the work is stale.

Very very very extreme but correct.
JoelKatz
Legendary

Offline

Activity: 1582
Merit: 1003

Democracy is vulnerable to a 51% attack.

 March 15, 2012, 05:15:37 AM

A:
Shares by you: (1 share / 42.9 s) * 30 s = 0.699 shares / GPU = 0 shares
Payout: ( 0 shares / 6980 shares ) * 50 BTC = 0 BTC
You would be precisely correct if .699 was equal to zero. But it's not. These are averages. Averaging .699 shares per round is very different from averaging zero shares per round. (Otherwise, no batter would ever hit a ball, since they all average fewer than one hit per at bat.)

1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
Defkin
Member

Offline

Activity: 80
Merit: 10

 March 15, 2012, 09:18:17 AM

Is it the theory that a card that is 10x faster can get a share or two in before the LP as opposed to 10 cards equaling the same hash rate due to the longer time required for the slower cards to generate a share thus missing the cutoff?

If this is the case it is also possible for the 10 cards to pop in up to 10 shares due to luck that would be impossible for the faster card to do because it is not developing them in parallel.

cmg5461
Sr. Member

Offline

Activity: 374
Merit: 250

 March 16, 2012, 04:14:31 AM

Is it the theory that a card that is 10x faster can get a share or two in before the LP as opposed to 10 cards equaling the same hash rate due to the longer time required for the slower cards to generate a share thus missing the cutoff?

If this is the case it is also possible for the 10 cards to pop in up to 10 shares due to luck that would be impossible for the faster card to do because it is not developing them in parallel.

That is correct.  Higher clocked card has a higher chance of getting the extra few shares in most of the time.  But the parallel cards can beat it too.  It all depends on the luck.

If I've helped: 1CmguJhwW4sbtSMFsyaafikJ8jhYS61quz

Sold: 5850 to lepenguin. Quick, easy and trustworthy.
 Pages: [1]
 « previous topic next topic »