Problem 44951. Verify Law of Large Numbers
Solution Stats
Problem Comments

17 Comments
The solution quits because it's taking too long. 1e8 is too many?
The difference should essentially be zero i.e. the two averages equal. I wrote a successful script; run in my desktop environment but the tool won't accept my answer as valid.
It crashes every time, how to complete it?
To get this right apparently you have to generate the random numbers exactly the same way as the answer key. When it tests your script it seeds the random number generator and then confirms whether your program gets EXACTLY the same result. However, if you generate the random numbers in any way different from the key, your answer will be "wrong" but is probably still correct.
There is a MatLab function that does it. Nice and easy.
Nice one
"1e8 Nsided dice" made me confused. I think it should be changed to "1e8sided dice".
this problem brakes the website. 1e8 is too big and the website blocks out my computer.
After multiple tries of submitting what i thought the correct answer and being met with "While evaluating the solution, the server encountered an error caused by temporary unavailability of MATLAB Service. Wait a few minutes for the MATLAB Service to return, and then rescore." what seemed to do the trick was what Marcel Dornbusch hinted in his comment.
Just make sure you do not output every bit of information in the code, and just output the answer.
description of this problem is confusing.
Good problem
nice problem
description of this problem is confusing.
nice
Challenging to make small!
quite a good question.
i think that makes meaning in statistics.
让我想到伯努利大数定律。
Solution Comments
Show commentsProblem Recent Solvers10435
Suggested Problems

Find the sum of all the numbers of the input vector
48984 Solvers

1421 Solvers

Matlab Basics  Absolute Value
607 Solvers

Solve a System of Linear Equations
11864 Solvers

1406 Solvers
More from this Author13
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!