Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Monty-Hall-problem/Stata/monty-hall-problem.stata
Normal file
10
Task/Monty-Hall-problem/Stata/monty-hall-problem.stata
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
clear
|
||||
set obs 1000000
|
||||
gen car=runiformint(1,3)
|
||||
gen choice1=runiformint(1,3)
|
||||
gen succ1=car==choice1
|
||||
gen shown=cond(succ1,runiformint(1,2),6-car-choice1)
|
||||
replace shown=shown+1 if succ1 & (car==1 | car==shown)
|
||||
gen choice2=6-shown-choice1
|
||||
gen succ2=car==choice2
|
||||
tabstat succ1 succ2, s(mean)
|
||||
Loading…
Add table
Add a link
Reference in a new issue