bcater | 13 years ago | on: Ask HN: How can I estimate traffic for a future event?
bcater's comments
bcater | 14 years ago | on: How can an ordinary person invest in startups?
bcater | 14 years ago | on: What do you think of my new Topic-based Twitter client?
bcater | 14 years ago | on: Ask HN: Best Linux distro for an old Laptop
I don't have personal experience with any other distros, but a friend of mine has an equally antiquated laptop running the latest Fedora which he claims is better than an abacus. YMMV.
bcater | 15 years ago | on: Anyone Need a Ruby on Rails or Lisp Developer?
bcater | 15 years ago | on: FetLife says "Goodbye Cassandra" for a 15% speed boost and better reliability
bcater | 15 years ago | on: Ask HN: $40k on physical hardware? or use the cloud?
bcater | 16 years ago | on: Ask HN: Programming books that a programmer read in his life
bcater | 16 years ago | on: Tell PG: This is what Paul Graham's next essay will be about
bcater | 16 years ago | on: Tell PG: This is what Paul Graham's next essay will be about
bcater | 16 years ago | on: Ask HN: Is there an app to view savings account bank statements?
bcater | 16 years ago | on: Try our app (Flowdock, the team messenger)
bcater | 16 years ago | on: Learn To F***ing Spell
bcater | 16 years ago | on: Coin Flip Brain Teaser
bcater | 16 years ago | on: Coin Flip Brain Teaser
bcater | 16 years ago | on: Coin Flip Brain Teaser
As a first guess, let's agree that in expectation you earn $0.51 each time you flip the coin, so it should take you about 20 tries to reach $10. Let's do something better, though.
EDIT: The previous paragraph is totally wrong. Thanks, tome :)
Let's build a confidence interval with alpha = 0.01 so that (1 - alpha) = 0.99. First, we'll need some trials. For that, I wrote a program that flipped a weighted coin and played the game until it reached $10 using the rules that you described. I recorded the number of coin flips required in each of 15 trials:
298, 84, 268, 2712, 110, 66, 42, 128, 84, 48, 280, 80, 64, 42, 234
We'll need the sample mean, X_bar = 302.
Now, we'll compute the Z-score so that we can build an interval in which the true mean (mu) lies with 99% probability:
P(-z <= Z <= z) = 0.99
We know that Z = (302 - mu) / (sigma / sqrt(n)), where sigma (the standard deviation) = 650 and sqrt(n) = 4. I'm rounding. Therefore, Z = (302 - mu) / 168.
Now, let's look at the cumulative distribution function Phi(z) and note that if Phi(z) = 1 - (alpha / 2) = 0.995, then Phi(z) ~= 0.997, the approximate cutoff for the 3rd standard deviation. Thus, z ~= 3.
Thus, we have that P(-3 <= (X_bar - mu) / (sigma / sqrt(n)) <= 3) = 0.99, so P(X_bar - 504 <= mu <= X_bar + 504) = 0.99. Therefore, I am 99% confident that the true mean, mu, lies on [X_bar - 504, X_bar + 504] = [302 - 504, 302 + 504].
That's a really wide range, and seemingly completely unhelpful for the purposes of betting. More sample trials would teach us more and lead us to a smaller interval since we expect that within some large number of trials we will converge on mu.
bcater | 16 years ago | on: RIP Michael Jackson
http://www.cnn.com/2009/SHOWBIZ/Music/06/25/michael.jackson/...
bcater | 16 years ago | on: Better Django models
class Format(models.Model): type = models.CharField(choices=...
type() is a Python function, so it doesn't make sense to use "type" as a field name. I found out the hard way that this causes bugs.
bcater | 17 years ago | on: Ask HN: How do you process credit card payments?
bcater | 17 years ago | on: Ask HN: Working through SICP. Did you make it?
For what it's worth, I really enjoyed SICP, though I still can't say that I understand every line in it.
For the curious, the site is http://betterific.com, which was linked from http://facebook.com/arbys, marking our first big partnership. After endless market surveys about what your customers want, Betterific tells you why.