Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Go Back  Xtreme Visual Basic Talk > > > Single Sigma Calculation Issue (coin flipping)


Reply
 
Thread Tools Display Modes
  #1  
Old 08-17-2016, 10:42 PM
Cerian Knight's Avatar
Cerian KnightSingle Sigma Calculation Issue (coin flipping) Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,193
Default Single Sigma Calculation Issue (coin flipping)


I was covering old ground on the 68% rule using 100 coin flips, but the problem is that I'm getting too close to 68% (regardless of PRNG used)! To be more specific, I'm getting about 68.06% instead of the theoretical 68.27%. Here is the code I used (which averages bounds inclusive and exclusive, which might be part of the problem):
Code:
Private Sub StdDev_Click()
Dim I As Long, J As Long, K As Long, L As Long
Dim C1 As Long, C2 As Long, C3 As Long, C4 As Long, C5 As Long
Dim S1 As Double, S2 As Double
Dim D As Double
D = CryptRandomizeD 'substitute your randomization in here (or, preferrably, in Form_Load)
For L = 1 To 10
    C3 = 0
    C5 = 0
    For K = 1 To 100
        C2 = 0
        C4 = 0
        For J = 1 To 1000
            C1 = 0
            For I = 1 To 100
                If CryptRndD >= 0.5 Then C1 = C1 + 1 'substitute your RNG here
            Next
            If C1 > 55 Or C1 < 45 Then C2 = C2 + 1
            If C1 >= 55 Or C1 <= 45 Then C4 = C4 + 1
        Next
        C3 = C3 + C2
        C5 = C5 + C4
    Next
    S1 = S1 + (1 - C3 / 100000)
    S2 = S2 + (1 - C5 / 100000)
Next
L = L - 1
Debug.Print S1 / L, S2 / L, (S1 + S2) / (L * 2) 'last value should, theoretically, be ~0.6827, but I get ~0.6806
End Sub
Can someone help me hammer this into shape?
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #2  
Old 08-18-2016, 07:17 PM
Cerian Knight's Avatar
Cerian KnightSingle Sigma Calculation Issue (coin flipping) Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,193
Default

I think I have this under control by mixing small populations in using the average above (3rd value, n-base) and (1st value, n-1 base).
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
Reply

Tags
dim, double, coin, substitute, 68%, cryptrndd, rng, preferrably, cryptrandomized, randomization, form_load, flips, rule, close, ground, issue, calculation, sigma, flipping, covering, prng, exclusive, single, inclusive, private


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping) Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
 
Single Sigma Calculation Issue (coin flipping)
Single Sigma Calculation Issue (coin flipping)
 
-->