Concept explainers
In lottery the player has to guess correctly r numbers that are drawn out of n numbers. The
where
r, the number of numbers that need to be guessed: and n. the number of numbers available. Use a subfunction inside ProbLottery for calculating
Cx,y.
(a) Use ProbLottery for calculating the probability of correctly selecting 3 of 6 numbers that are drawn out of 49 numbers in a lottery game.
(b) Consider a lottery game in which 6 numbers are drawn out of 49 numbers. Write a program in a script file that displays a table with seven rows and two columns. The first column has the numbers 0, 1, 2, 3, 4, 5, and 6, which are the number of numbers guessed correctly. The second column show the corresponding probability of making the guess.
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
MATLAB: An Introduction with Applications
- College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningAlgebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning
- Glencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw HillAlgebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal Littell