English
Source / code snippets

Normalverteilte Zufallszahlen, quick´n dirty: Algorithmus to Lindgren and Meyer

 

p.specht

the to individual 'Teil-Erfindern' so named Lindgren-Meyer-take action is a Grenzfall: right quick, can qualitative sometimes to accept, must one but not: into individual Glockenkurven-Ausläufern ought to one The quality ggf. with others take action to check on (z.B. if it circa Atomkraftwerke goes):
Window Title "Lindgren-Meyer: Normalverteilte Zufallszahlen"
' Demoware (D) jan. 2012 P. woodpecker. No Gewähr - for garnichts.
' After the "Zentralen Grenzwertsatz" can quasi-normalverteilte
' Zufallszahlen through Aufsummieren unabhängiger gleichverteilter
' Zufallszahlen receive go (quality = Aufwandsfrage! B.W. Lindgren 1960, with MacMillan)
' [Zit. O.Schlosser - introduction into sozialwissenschaftliche
' Zusammenhanganalyse,attachment s.282, rororo, ISBN 3 499 21089 4:]
' After [D. L. Meyer 1969] wealthy already 12 independent Zufallszahlen. Zieht
' one of each Z-worth [Anm.d.Verf.: Z = Sum[1..12](rnd())] whom middle-
' worth 6 ex, sustain one The ..values the standard-Normalverteilung (Sigma=1)
' [Zit. end] - well the would Yes simply! look we time:
Font 2:Cls:Set("decimals",16)
AppendMenubar 10,"Für spending the Zahlenwerte mouse in the left area hold."
declare sum!,n&,i&
declare sumsum!,mw!,vrz!
n&=10000

Repeat

    inc i&
    sum!=0

    Whileloop 12

        sum!=sum!+rnd()

    Endwhile

    sum!=sum!-6
    case %mousex<200:print sum!
    sumsum!=sumsum!+sum!' only for Test
    vrz!=vrz!+sum!*sum!' only for Test
    case %csrlin>22:cls
    case %Key=1:break

Until i&>n&

' Test:
mw!=sumsum!/n&
print "\n        story: "; mw!
vrz!=(vrz!-(mw!*mw!)/n&)/(n&-1)
print "           Varianz: "; vrz!
print " Standardabweichug: "; sqrt(vrz!)
WaitInput
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
04/25/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

614 Views

Untitledvor 0 min.
N.Art07/21/22
Ernst07/21/21
Glubbfan06/19/21
Uwe ''Pascal'' Niemeier06/13/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie