abc

Spin once

Reset

Angle 1:

Angle 2:

Prize 1:

Prize 2:

Prize 3:

No. spins:

Spin lots

Show Probability Distribution

A\;fair\;price\;for\;this\;game\;is\;

show expected value

show vector

myclassesd: {0, 90, 270, 360}
myclassesr: (myclassesd / 180 * π)
sspace: {NaN}
arot: (Random[0, 360] / 180 * π)
c = Circle((0, 0), 4)
u = Vector((4, 0))
count = 0
rot = 0 (slider from 0 to arot, step 0.01745329)
v = Rotate(u, rot)
hist = Histogram(myclassesr, sspace, false)
h1 = 0
h2 = 0
h3 = 0
A = (4, 0)
O = (0, 0)
zA = 0
zB = 0
zC = 0
angle1 = 60
angle2 = 90
inputBox1 = Textfield(angle1)
inputBox2 = Textfield(angle2)
B = Rotate(A, (angle1 / 180 * π), O)
C = Rotate(B, (angle2 * π / 180), O)
d = Sector(c, A, B)
e = Sector(c, B, C)
f = Sector(c, C, A)
angleA = Angle(B)
angleB = Angle(C)
arotd: (arot * 180 / π)
barheights: {zA / count, zB / count, zC / count}
s1text = Rotate(u, angleA / 2)
s3text = Rotate(u, angleB + ((2 * π) - angleB) / 2)
s2text = Rotate(u, angleA + (angleB - angleA) / 2)
D = Midpoint(O, (x(s1text), y(s1text)))
E = Midpoint(O, (x(s2text), y(s2text)))
F = Midpoint(O, (x(s3text), y(s3text)))
p1 = 2
p2 = 4
p3 = 6
inputBox3 = Textfield(p1)
inputBox4 = Textfield(p2)
inputBox5 = Textfield(p3)
text1: "" + (LaTeX[p1]) + ""
text2: "" + (LaTeX[p2]) + ""
text3: "" + (LaTeX[p3]) + ""
nspins = 100
inputBox6 = Textfield(nspins)
mspins = 100 (slider from 1 to nspins, step 1)
barheightst: {angle1 / 360, angle2 / 360, (360 - angle1 - angle2) / 360}
fader = 0
mybar = BarChart({1, 3, 5}, barheights)
mybart = BarChart({1, 3, 5}, barheightst)
text4: "" + (LaTeX[p1]) + ""
text5: "" + (LaTeX[p2]) + ""
text6: "" + (LaTeX[p3]) + ""
a = false
b = Segment((0, 0), (100, 0))
h = false
ev: (angle1 / 360 * p1) + (angle2 / 360 * p2) + ((360 - angle1 - angle2) / 360 * p3)
text8: "" + ev + ""
text9: "Spin\;" + (LaTeX[count]) + ""
i = true
text10 = RotateText("Relative Frequency", 1.5707963267948966)