Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,15 +0,0 @@
|
|||
function randN ( [int]$N )
|
||||
{
|
||||
[int]( ( Get-Random -Maximum $N ) -eq 0 )
|
||||
}
|
||||
|
||||
function unbiased ( [int]$N )
|
||||
{
|
||||
do {
|
||||
$X = randN $N
|
||||
$Y = randN $N
|
||||
}
|
||||
While ( $X -eq $Y )
|
||||
|
||||
return $X
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
$Tests = 1000
|
||||
ForEach ( $N in 3..6 )
|
||||
{
|
||||
$Biased = 0
|
||||
$Unbiased = 0
|
||||
|
||||
ForEach ( $Test in 1..$Tests )
|
||||
{
|
||||
$Biased += randN $N
|
||||
$Unbiased += unbiased $N
|
||||
}
|
||||
[pscustomobject]@{ N = $N
|
||||
"Biased Ones out of $Test" = $Biased
|
||||
"Unbiased Ones out of $Test" = $Unbiased }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue