Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Monty-Hall-problem/Quackery/monty-hall-problem.quackery
Normal file
18
Task/Monty-Hall-problem/Quackery/monty-hall-problem.quackery
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[ $ "bigrat.qky" loadfile ] now!
|
||||
|
||||
[ 0 ( number of cars when not changing choice )
|
||||
0 ( number of cars when changing choice )
|
||||
rot times
|
||||
[ 3 random ( door with goat )
|
||||
3 random ( contestant's choice )
|
||||
= ( If the two numbers are equal then the contestant
|
||||
wins a car if they change their mind, and they win
|
||||
a goat if they don't change their mind. The wins
|
||||
are reversed if the numbers are not equal. )
|
||||
if dip 1+ ] ( increment the relevant count )
|
||||
|
||||
say "Strategy A is that the contestant changes their mind." cr
|
||||
say "Strategy B is that the contestant does not their mind." cr
|
||||
say "Approximate ratio of car wins with strategy A over strategy B: "
|
||||
swap 100 round
|
||||
vulgar$ echo$ cr ] is trials ( n --> )
|
||||
Loading…
Add table
Add a link
Reference in a new issue