
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
4th Edition
ISBN: 9780128045251
Author: Stormy Attaway Ph.D. Boston University
Publisher: Elsevier Science
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 4, Problem 10E
To determine
To write:
A script that will prompt the user for a character and then create an x-
Expert Solution & Answer

Want to see the full answer?
Check out a sample textbook solution
Students have asked these similar questions
Suppose that the number of expensive goods X sold in a shop over 24 days,
is Poisson random variable with rate 240, i.e. X Poisson (240), where > 0 is the
expected number of sales per day and is the unknown parameter that we would like to
estimate. Suppose further that can take three possible values 0₁ = 1/2, 0, 1/4 and
0₁ = 1/8, with prior probabilities 0.2, 0.5 and 0.3, respectively. Suppose now that we
observe that x=10 expensive goods were sold in the last 24 days.
(a) Write down the likelihood function for and find the MLE of 0.
(b) Given the observed data 2 = 10, what is the posterior distribution of 0, p(0 | x=
10)?
(c) What is the posterior mean for ?
(d) What is the posterior standard deviation for 0? [Hint: You may use the fact if X
is a random variable, then var(X) = E(X²) – [E(X)]²].
A machine is built to make mass-produced items. Each item made by the
machine has a probability of being defective. Given the value of 0, the items are
independent of each other, where is unknown and would like to estimate. Suppose
has for prior distribution a Beta(a, ß) distribution, where a > 0 and 3>0. The
machine is tested by producing items until the first defective occurs. Suppose that the
first 12 items are not defective but the y = 13th item is defective.
(a) Write down the likelihood function for 0 and find the MLE of 0.
(b) Given the observed data y = 13, what is the posterior distribution of 0, p(0 | y =
13)?
Take a = 1 and ẞ= 19.
(c) What are the parameters of the posterior distribution?
(d) What is the posterior mean for 0?
(e) What is the posterior standard deviation?
=
Suppose that the number of expensive goods X sold in a shop over 24 days,
is Poisson random variable with rate 240, i.e. X Poisson (240), where > 0 is the
expected number of sales per day and is the unknown parameter that we would like to
estimate. Suppose further that can take three possible values 0₁ = 1/2, 0, 1/4 and
0₁ = 1/8, with prior probabilities 0.2, 0.5 and 0.3, respectively. Suppose now that we
observe that x=10 expensive goods were sold in the last 24 days.
(a) Write down the likelihood function for and find the MLE of 0.
(b) Given the observed data 2 = 10, what is the posterior distribution of 0, p(0 | x=
10)?
(c) What is the posterior mean for ?
(d) What is the posterior standard deviation for 0? [Hint: You may use the fact if X
is a random variable, then var(X) = E(X²) – [E(X)]²].
Chapter 4 Solutions
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
Ch. 4 - Prob. 4.1PCh. 4 - Prob. 4.2PCh. 4 - Prob. 4.3PCh. 4 - Prob. 4.4PCh. 4 - Prob. 4.5PCh. 4 - Prob. 1ECh. 4 - Prob. 2ECh. 4 - Prob. 3ECh. 4 - Prob. 4ECh. 4 - Prob. 5E
Ch. 4 - Prob. 6ECh. 4 - Prob. 7ECh. 4 - Prob. 8ECh. 4 - Prob. 9ECh. 4 - Prob. 10ECh. 4 - Prob. 11ECh. 4 - Prob. 12ECh. 4 - Prob. 13ECh. 4 - Prob. 14ECh. 4 - Prob. 15ECh. 4 - Prob. 16ECh. 4 - Prob. 17ECh. 4 - Prob. 18ECh. 4 - Prob. 19ECh. 4 - Prob. 20ECh. 4 - Prob. 21ECh. 4 - Prob. 22ECh. 4 - Prob. 23ECh. 4 - Prob. 24ECh. 4 - Prob. 25ECh. 4 - Prob. 26ECh. 4 - Prob. 27ECh. 4 - Prob. 28ECh. 4 - Prob. 29ECh. 4 - Prob. 30E
Knowledge Booster
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
- 4. Suppose you are investigating the properties of three random variables called "A", "B", and "C", and you discover the following information about them: A ~ N(0,1); B ~ C~X(μc, 2), where all observations on "A" are independent, and, "B" and "C" are independent of each other. Use this information to answer the following questions. (a.) Suppose we create a new variable, "D", as: What type of distribution does "D" have? D = (b.) What are the degrees of freedom of "D" in this example? (c.) Suppose we create a new variable, "E", as: 45 E == ΣΑ i=1 What type of distribution does "E" have? (d.) What are the degrees of freedom of "E" in this example?arrow_forward23. If P(A)=0.4, P(A or B)=0.9, and P(A and B)=0.2. find P(B). A. 0.7° B. 0.3 C. -0.7 D. 0.5arrow_forward6 In Statistics class, the probability that a randomly-selected student was born in India is 0.07. 10 students are independently and randomly selected. What is the probability that at least one of them was born in India? 9 a) 0.07 b) 0.93 c) 0.48 d) 0.52arrow_forward
- Normal DistributionHeights of students are normally distributed with mean 170 cm and standard deviation 6 cm.Find the probability that a student’s height is between 164 cm and 176 cm.arrow_forwardBinomial DistributionA coin is tossed 6 times.Find the probability of getting exactly 4 heads.arrow_forwardThe average number of calls received by a call center in 10 minutes is 3.Find the probability that exactly 5 calls are received in 10 minutes.arrow_forward
- A population has mean 50 and standard deviation 10.If a random sample of size 25 is taken, find the standard error of the mean.arrow_forwardA manufacturer claims that the mean life of their bulbs is 1200 hours with a standard deviation of 100 hours.A sample of 25 bulbs has a mean life of 1170 hours.Test the claim at a 5% significance level.arrow_forwardFor the matrix A below, find a nonzero vector in Nul A and a nonzero vector in Col A. 4 2 -4 0 A= - 12 -4 20 -8 12 2-28 16 Find a nonzero vector in Nul A.arrow_forward
- During the 2017-2018 flu season, a random sample of 180 hospitalizations related to flu was studied. It was later determined that 19 patients have died. A similar study during the 2018-2019 flu season revealed that in a random sample of 180 hospitalized cases related to flu, there were 16 deaths observed. At 5% significance level, test the claim that the percentage of deaths in 2017-2018 is greater than the percentage of deaths in the 2018-2019 season. Procedure: Two proportions Z Hypothesis Test Assumptions: (select everything that applies) Normal populations Population standard deviation are unknown but assumed equal The number of positive and negative responses are both 10 or more for each sample Paired samples Population standard deviation are unknown Sample sizes are both greater than 30 Simple random samples Population standard deviations are known Independent samples Step 1. Hypotheses Set-Up: Ho: Select an answer H: Select an answer ?~ Step 2. The significance level a = 96…arrow_forwardIn hypothesis testing, a Type I error is:A. Failing to reject a false null hypothesisB. Rejecting a true null hypothesisC. Choosing the wrong statistical testD. A computational rounding errorarrow_forwardA 95% confidence interval for a mean is (10, 16). Which statement is correct?A. There is a 95% probability the population mean lies between 10 and 16.B. 95% of the sample data lie between 10 and 16.C. If we repeat the sampling procedure many times, ~95% of such CIs will contain the true mean.D. The true mean is definitely 13.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageTrigonometry (MindTap Course List)TrigonometryISBN:9781337278461Author:Ron LarsonPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- Elementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage LearningFunctions and Change: A Modeling Approach to Coll...AlgebraISBN:9781337111348Author:Bruce Crauder, Benny Evans, Alan NoellPublisher:Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage

Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning

Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning

Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:9781305658004
Author:Ron Larson
Publisher:Cengage Learning

Functions and Change: A Modeling Approach to Coll...
Algebra
ISBN:9781337111348
Author:Bruce Crauder, Benny Evans, Alan Noell
Publisher:Cengage Learning

How to find the magnitude and direction of a given vector; Author: Brian McLogan;https://www.youtube.com/watch?v=4qE-ZrR_NxI;License: Standard YouTube License, CC-BY
Linear Algebra for Computer Scientists. 2. Magnitude of a Vector; Author: Computer Science;https://www.youtube.com/watch?v=ElnuSJyUdR4;License: Standard YouTube License, CC-BY