# Write a Matlab function x=faxlength8(m) that produces m random sample values of the fax length X… 1 answer below »

Write a Matlab function x=faxlength8(m) that produces m random sample values of the fax length X with PMF given in Example 2.29.

Example 2.29

Suppose the probability model for the number of pages X of a fax in Example 2.28 is

For the pricing plan given in Example 2.27, what is the PMF and expected value of Y, the cost of a fax?

Example 2.27

The random variable X is the number of pages in a facsimile transmission. Based on experience, you have a probability model PX (x) for the number of pages in each fax you send. The phone company offers you a new charging plan for faxes: \$0.10 for the first page, \$0.09 for the second page, etc., down to \$0.06 for the fifth page. For all faxes between 6 and 10 pages, the phone company will charge \$0.50 per fax. (It will not accept faxes longer than ten pages.) Find a function Y = g(X) for the charge in cents for sending one fax.