News for hackers. Stuff that matters.
Re:The Man Who Invented Modern Probability by relaia on Thursday August 22, 2013 @05:28PM (#6260219)
27?
Re:The Man Who Invented Modern Probability by tzs on Thursday August 22, 2013 @06:06PM (#6260415)
Nope. To see where the subtlety lies in this problem, simplify it. Change it to a discrete problem: the side can be 1, 3, or 5, each with probability 1/3. The expected value of the side length is still 3.

1/3 of the cubes have volume 1, 1/3 have volume 27, and 1/3 have volume 125. The expected value of the volume is 51. Think about why it is 51, not 27, and you'll see why it is not 27 for the continuous case.

In general, if you have a random variable X, and some function of that random variable, f(X), then it is NOT true that expected value of f(X) = f(expected value of X).

Re:The Man Who Invented Modern Probability by dropdownmenu on Thursday August 22, 2013 @10:01PM (#6261293)
27 would be correct if each side were independent random variables rather than the cube of a random variable. The way the problem is set up you are suppose to solve for E[a^3] (the third moment of the random variable) rather than (E[a])^3.
Re:The Man Who Invented Modern Probability by zeckalpha on Thursday August 22, 2013 @05:53PM (#6260353)
I'd say 45, assuming the side length is an integer.
Re:The Man Who Invented Modern Probability by lsconjugate on Thursday August 22, 2013 @05:46PM (#6260308)
39
Re:The Man Who Invented Modern Probability by solve on Thursday August 22, 2013 @06:03PM (#6260402)

    from random import random
    sum([(random()*4+1)**3 for x in xrange(1000000)])/1000000
    => ~39
Weird.
Re:The Man Who Invented Modern Probability by bluetech on Friday August 23, 2013 @03:18AM (#6262174)

  sum(random.uniform(1, 5)**3 for i in range(10000)) / 10000
Many people don't know that the random module allows to sample from many distributions directly without having to construct your own.
Re:The Man Who Invented Modern Probability by hollerith on Friday August 23, 2013 @06:39AM (#6262656)
I like the first version better because everyone knows what infix * and + do.
Re:The Man Who Invented Modern Probability by saucetenuto on Friday August 23, 2013 @08:58AM (#6263174)
I like the second version better because it taught me something I didn't know.