The Monty Hall Problem

Introduction

Here be some words!

Code

No Switch

Here I can describe the code!

NoSwitch[]:=(HostDoor=RandomInteger[{1,3}];
GuestDoor=RandomInteger[{1,3}];
(* Here be comment *)
OpenDoor=RandomChoice[
Complement[{1,2,3}, {HostDoor,GuestDoor}]];
If[HostDoor==GuestDoor,1,0]
)

Yes Switch

YesSwitch[]:=(HostDoor=RandomInteger[{1,3}];
GuestDoor=RandomInteger[{1,3}];
OpenDoor=RandomChoice[
Complement[{1,2,3}, {HostDoor,GuestDoor}]];
GuestDoor=RandomChoice[
Complement[{1,2,3}, {OpenDoor,GuestDoor}]];
If[HostDoor==GuestDoor,1,0]
)

Simulations

Data=Table[
YesSwitch[],
{120}];
Histogram[Data]

RandomChoice

Data=Table[
RandomInteger[{1,3}],
{1200}];
Histogram[Data]

?Table

Here be text  (∫_1^2)(x^(x^(x^2)))dx  (({{1, 2, 3, 4, 5}, {6, 7, 7, 7, 7}, {□, □, □, □, □}, {□, □, □, □, □}, {□, sin((x^2)), (∑_(x=1)^123)sin((x^2)), □, □}, {□, □, □, □, □}, {□, α, β, χ, γ}, {□, □, □, □, □}}))