Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Generate 10,058,744 random floating numbers from [0,1), and count how many will fall into each of the intervals: [0, 0.522), [0.522, 0.522+0.442), or [0.522+0.442, 1). You can do it with less calculations if you know how to generate random numbers from binomial distribution. Then you should calculate percentages from these three numbers just to be sure they are right.

It is not difficult at all, but it needs some basic programming skills and some basic knowledge of statistics.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: