MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
5th Edition
ISBN: 9781118629864
Author: Amos Gilat
Publisher: WILEY
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 40P

In lottery the player has to guess correctly r numbers that are drawn out of n numbers. The probability, P, of guessing m numbers out of the r numbers can be calculated by the expression:

P = C r , m C ( n r ) , ( r m ) C n , r

where C x , y = x ! y ! ( x y ) ! . Write a user-defined MAILAB function that calculates P. For the function name and arguments, use P=ProbLot-tery (m, r, n). The input arguments are m. the number of correct guesses:

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.

Blurred answer
Students have asked these similar questions
Two measurements are made of some quantity. For the first measurement, the average is 74.4528, the RMS error is 6.7441, and the uncertainty of the mean is 0.9264. For the second one, the average is 76.8415, the standard deviation is 8.3348, and the uncertainty of the mean is 1.1448. The expected value is exactly 75. 13. Express the first measurement in public notation. 14. Is there a significant difference between the two measurements? 1 15. How does the first measurement compare with the expected value? 16. How does the second measurement compare with the expected value?
A hat contains slips of paper numbered 1 through 6. You draw two slips of paper at random from the hat,without replacing the first slip into the hat.(a) (5 points) Write out the sample space S for this experiment.(b) (5 points) Express the event E : {the sum of the numbers on the slips of paper is 4} as a subset of S.(c) (5 points) Find P(E)(d) (5 points) Let F = {the larger minus the smaller number is 0}. What is P(F )?(e) (5 points) Are E and F disjoint? Why or why not?(f) (5 points) Find P(E ∪ F )
In addition to the in-school milk supplement program, the nurse would like to increase the use of daily vitamin supplements for the children by visiting homes and educating about the merits of vitamins. She believes that currently, about 50% of families with school-age children give the children a daily megavitamin. She would like to increase this to 70%. She plans a two-group study, where one group serves as a control and the other group receives her visits. How many families should she expect to visit to have 80% power of detecting this difference? Assume that drop-out rate is 5%.
Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Algebra: Structure And Method, Book 1
Algebra
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:McDougal Littell
Text book image
College Algebra
Algebra
ISBN:9781305115545
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning
Text book image
Intermediate Algebra
Algebra
ISBN:9780998625720
Author:Lynn Marecek
Publisher:OpenStax College
Text book image
Big Ideas Math A Bridge To Success Algebra 1: Stu...
Algebra
ISBN:9781680331141
Author:HOUGHTON MIFFLIN HARCOURT
Publisher:Houghton Mifflin Harcourt
Text book image
College Algebra
Algebra
ISBN:9781938168383
Author:Jay Abramson
Publisher:OpenStax
Finding Local Maxima and Minima by Differentiation; Author: Professor Dave Explains;https://www.youtube.com/watch?v=pvLj1s7SOtk;License: Standard YouTube License, CC-BY