Skip to main content

Weighted Coin



Let's play a game:

There is one weighted coin; the rest are fair. You have to figure out which one is unfair... to leave the classroom.

Good luck!

Homework

Flip a coin 100 times. Record the sequence of flips, eg, H, T, T, H... Count  He number of heads and number of tails. What was your longest streak?

Comments

Unknown said…
For the Homework here's the python code that I used:

import random

heads = 0
tails = 0

for x in range(1, 101):
randomInt = random.randint(1, 2)
if randomInt == 1:
print(str(x) + ": Heads")
heads += 1
else:
print(str(x) + ": Tails")
tails += 1
print()
print("HEADS:" + str(heads))
print("TAILS:" + str(tails))
Unknown said…
The output of that program should look something like this:

1: Tails
2: Tails
3: Heads
4: Heads
5: Heads
6: Tails
7: Tails
8: Heads
9: Heads
10: Tails
11: Heads
12: Tails
13: Tails
14: Tails
15: Tails
16: Tails
17: Tails
18: Heads
19: Heads
20: Heads
21: Tails
22: Tails
23: Tails
24: Heads
25: Heads
26: Heads
27: Heads
28: Tails
29: Tails
30: Heads
31: Heads
32: Heads
33: Heads
34: Heads
35: Tails
36: Tails
37: Heads
38: Tails
39: Heads
40: Heads
41: Heads
42: Tails
43: Tails
44: Heads
45: Tails
46: Tails
47: Tails
48: Heads
49: Tails
50: Tails
51: Tails
52: Heads
53: Tails
54: Heads
55: Tails
56: Heads
57: Tails
58: Heads
59: Tails
60: Tails
61: Tails
62: Tails
63: Heads
64: Tails
65: Tails
66: Heads
67: Tails
68: Heads
69: Heads
70: Heads
71: Heads
72: Heads
73: Heads
74: Heads
75: Heads
76: Heads
77: Heads
78: Heads
79: Tails
80: Heads
81: Tails
82: Heads
83: Tails
84: Heads
85: Heads
86: Heads
87: Tails
88: Heads
89: Heads
90: Heads
91: Tails
92: Heads
93: Heads
94: Tails
95: Tails
96: Tails
97: Heads
98: Tails
99: Tails
100: Tails

HEADS:52
TAILS:48
Unknown said…
Nice, Iggy. Python is so clean.

Popular posts from this blog

Marvin Minsky, AI, Math Education

The audio is too good to make this a gif. So, to be clear, this is the blog post for THURSDAY, 1/28. If you are looking for Tuesday's post, go back a post. I wanted to mention to you all that a mathematician and artificial intelligence researched named Marvin Minsky died on Sunday. Among lots of amazing things he did in his life, he wrote about math education for the OLPC (One Laptop Per Child) project. Here is that article ; I'd like you to read it for homework. Speaking of death, check out this amazing visualization ! Finally, for classwork, I would like you to go back to Tuesday's blog post, and comment on other people's homework. Specifically do you like the charts they chose? Are they interesting? Any feedback? Homework IMPORTANT: Pick which 5 (or more) variables that you will track for the Feltron project. Think about how you will keep track of them - pen and and notebook? The Reporter App? A pedometer? Also, that Marvin Minsky article is really

Statistical Studies - Tuesday 2/2/2016

Ok, today didn't go exactly as planned. If you saw the blog post I had up planned for today... we will get to that, but I incorrectly estimated how long some work would take you. Not your fault. You guys just move so fast through most material! You are working on the  Statistical Studies topic  on Khan Academy. It is not easy. That is okay. You don't have to get frustrated, or discouraged, or stressed. If it takes longer than I thought it would, I'll give you more time. Some good insights from the classwork: Go straight to the exercises, but go back to the videos if you are stuck If the videos feel too long, you can speed up playback (in the options menu, click the gear button). 1.25x isn't even noticeable. 1.5x is, but if you listen for a while you get used to it and can switch to 2x An "experiment" involves splitting a subset of the population you are looking at into two groups: one called the "control", who don't do anything diff

Monday 9/28

9/28/15 Monday Check in: Friday class & Homework Classwork: As long as we’re talking climate change... If someone tells you they don’t believe humans are causing it, you might want to ask them if smoking is bad for you. Why? There is as much evidence that humans are causing global warming as there is evidence that smoking causes cancer (you don’t have to click that link, I just like to put it up). Anyway, here’s a chart: It is entitled “Breakdown of the anthropic greenhouse gas emissions by gas, in billion tons carbon equivalent, in 2004” - it is a breakdown of the greenhouse gases emitted in 2004 that humans are responsible for. What’s the biggest greenhouse gas? What’s all that CO2 doing, and where does it go? A lot of it goes into the ocean, which seems better than the air, and it is... up to a point. The more CO2 in the ocean, the more acidic it gets (And the more acidic it gets, the lower its ph gets). That is fine... until it’s not. At some