Problem 43575. Probabilities - More brains than luck
This problem is related to Problem 596. More luck than brains where the test suite checks 3 times if the outcome of the solution is a random number between 1 and 6.
Using brain, the "solver" would be interested in computing the probability of passing a general test (with some other interesting probabilities) where the suite checks C times if the outcome of the solution is a random number between 1 and N.
So, here is the problem:
- Each test in the suite checks if a random number between 1 and N is guessed.
- There are C tests in the suite.
Output these values, given inputs N,C,K:
- P = the probability of passing the test suite.
- XK = the probability that the number of times the function must be run to get a success (passing the test suite) is K.
- M = the mean number of times the function must be run to get a success.
You will see that, for N=6 and C=3, then M=216.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers19
Suggested Problems
-
4927 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
662 Solvers
-
Generate N equally spaced intervals between -L and L
920 Solvers
-
Remove element(s) from cell array
1882 Solvers
-
Find my daddy long leg (No 's')
2633 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!