Problem: Without any Cody cheats, write code that passes the test suite.
Hint: The test suite gets samples from the probability distribution represented by your code. A cumulative distribution function is then built from the samples. This is the empirical distribution, which is compared against the theoretical distribution you must infer from the test suite.
See also: Cumulative Distribution Function
Problems in Series: Probability Problem 2, Probability Problem 3
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
Determine whether a vector is monotonically increasing
22875 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1992 Solvers
-
Magic is simple (for beginners)
11142 Solvers
-
5768 Solvers
-
Probability of Choosing a Red Ball
65 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I added test cases to rule out equally spaced answers.
Added random numbers to equally spaced answers. :-P