Let X be a random variable that follows the beta distribution. This random variable is continuous and is defined over the interval from 0 to 1. The probability density function is given by f(x)= x-1(1-x)-1 (a-1)!(B-1)! (a + B-1)! where a andare integers, whose values determine the shape of the probability density function. Because X varies between 0 and 1, we can think of X as the probability that some event (say) E occurs or the proportion of times an event occurs in some population. For example, E could denote the event that a critical part in a newly designed car will lead to a catastrophic failure in accidents at high speeds. The expected value (i.e., mean) of this random variable is [a /(a + ß)]. That is, E(X)= α a+ß The Excel commands for the beta random variable are -beta.dist(x, a, B ,true,0,1) for the cumulative probability distribution, and -beta.dist(x, a, ß,false,0,1) for the probability density function. (a) Now, think in Bayesian terms. Previously P(B) denoted prior probability; and P(B) was a single number between 0 and 1, such as, for example, P(B) = .7. Now, the prior is an entire probability density function f(x). For example, f(x) is the prior probability density for the event E described above. Assume that a =B=2. Show that this Bayesian prior f(x) is a quadratic. Also, graph this function in Excel as follows: In Column A, set x = 0, and then increment x by .01 in successive rows until you reach x = 1.0. That is, the values in Column A are 0, .01, .02, ...., .99, 1.00. In Column B, calculate the corresponding values of f(x). Draw a graph in Excel with x on the horizontal axis and f(x) on the vertical axis. This prior probability density function represents your beliefs (for whatever reasons) about the probability of event E occurring. At what value of x is the quadratic maximized [which is the expected value of X because of the symmetry of f(x)]? You conduct n tests and find that the event E occurs in 1₁ of these n tests. It turns out that the posterior probability density function also has a beta distribution. [In Bayesian theory parlance, we say that the beta distribution is a conjugate prior when the likelihood function is binomial.] The new Excel commands for the posterior density become =beta.dist(x, a +n₁, B+n-n₁ ,true,0,1) for the cumulative probability distribution, and =beta.dist(x, a + n₁, B+n- n₁ ,false,0,1) for the probability density function. Suppose your n = 10 tests and in ₁ = 2 cases the event E occurs (still keeping a =B=2). [These tests are expensive because they involve intentionally crashing cars at high speeds, which, of course, destroys the test cars in order to determine whether there will be a critical failure of the part being tested.] In Column C, calculate the values of the posterior probability density function for x = 0, .01, .02, ...., .99, 1.00 and graph it on the same chart as you graphed the prior probability density function. (b) Using the prior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%? Using the posterior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%?

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

See attached. 

Let X be a random variable that follows the beta distribution. This random variable is continuous and is defined over the interval
from 0 to 1. The probability density function is given by
f(x)=
x-1(1-x) ³-1
(a − 1)!(ß−1)!
(a + ß-1)!
where and are integers, whose values determine the shape of the probability density function. Because X varies between 0
and 1, we can think of X as the probability that some event (say) E occurs or the proportion of times an event occurs in some
population. For example, E could denote the event that a critical part in a newly designed car will lead to a catastrophic failure in
accidents at high speeds.
The expected value (i.e., mean) of this random variable is [a /(a + ß)]. That is,
E(X) =
a
a + ß
The Excel commands for the beta random variable are
=beta.dist(x, a, b,true,0,1) for the cumulative probability distribution, and
=beta.dist(x, a, b,false,0,1) for the probability density function.
(a) Now, think in Bayesian terms. Previously P(B) denoted prior probability; and P(B) was a single number between 0 and 1,
such as, for example, P(B) = .7. Now, the prior is an entire probability density function f(x). For example, f(x) is the prior
probability density for the event E described above. Assume that a = B =2. Show that this Bayesian prior f(x) is a quadratic.
Also, graph this function in Excel as follows: In Column A, set x = 0, and then increment x by .01 in successive rows until you
reach x = 1.0. That is, the values in Column A are 0, .01, .02, ...., .99, 1.00. In Column B, calculate the corresponding values of
f(x). Draw a graph in Excel with x on the horizontal axis and f(x) on the vertical axis. This prior probability density
function represents your beliefs (for whatever reasons) about the probability of event E occurring. At what value of x is the
quadratic maximized [which is the expected value of X because of the symmetry of f(x) ]?
You conduct n tests and find that the event E occurs in n of these n tests. It turns out that the posterior probability density
function also has a beta distribution. [In Bayesian theory parlance, we say that the beta distribution is a conjugate prior when the
likelihood function is binomial.] The new Excel commands for the posterior density become
=beta.dist(x, a +n₁, ß +n- n₁ ,true,0,1) for the cumulative probability distribution, and
=beta.dist(x, a + n₁, ß+n-n₁ ,false,0,1) for the probability density function.
Suppose your n = 10 tests and in ₁ = 2 cases the event E occurs (still keeping a =B=2). [These tests are expensive because
they involve intentionally crashing cars at high speeds, which, of course, destroys the test cars in order to determine whether
there will be a critical failure of the part being tested.] In Column C, calculate the values of the posterior probability density
function for x = 0, .01, .02, ...., .99, 1.00 and graph it on the same chart as you graphed the prior probability density function.
(b) Using the prior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%?
Using the posterior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%?
Transcribed Image Text:Let X be a random variable that follows the beta distribution. This random variable is continuous and is defined over the interval from 0 to 1. The probability density function is given by f(x)= x-1(1-x) ³-1 (a − 1)!(ß−1)! (a + ß-1)! where and are integers, whose values determine the shape of the probability density function. Because X varies between 0 and 1, we can think of X as the probability that some event (say) E occurs or the proportion of times an event occurs in some population. For example, E could denote the event that a critical part in a newly designed car will lead to a catastrophic failure in accidents at high speeds. The expected value (i.e., mean) of this random variable is [a /(a + ß)]. That is, E(X) = a a + ß The Excel commands for the beta random variable are =beta.dist(x, a, b,true,0,1) for the cumulative probability distribution, and =beta.dist(x, a, b,false,0,1) for the probability density function. (a) Now, think in Bayesian terms. Previously P(B) denoted prior probability; and P(B) was a single number between 0 and 1, such as, for example, P(B) = .7. Now, the prior is an entire probability density function f(x). For example, f(x) is the prior probability density for the event E described above. Assume that a = B =2. Show that this Bayesian prior f(x) is a quadratic. Also, graph this function in Excel as follows: In Column A, set x = 0, and then increment x by .01 in successive rows until you reach x = 1.0. That is, the values in Column A are 0, .01, .02, ...., .99, 1.00. In Column B, calculate the corresponding values of f(x). Draw a graph in Excel with x on the horizontal axis and f(x) on the vertical axis. This prior probability density function represents your beliefs (for whatever reasons) about the probability of event E occurring. At what value of x is the quadratic maximized [which is the expected value of X because of the symmetry of f(x) ]? You conduct n tests and find that the event E occurs in n of these n tests. It turns out that the posterior probability density function also has a beta distribution. [In Bayesian theory parlance, we say that the beta distribution is a conjugate prior when the likelihood function is binomial.] The new Excel commands for the posterior density become =beta.dist(x, a +n₁, ß +n- n₁ ,true,0,1) for the cumulative probability distribution, and =beta.dist(x, a + n₁, ß+n-n₁ ,false,0,1) for the probability density function. Suppose your n = 10 tests and in ₁ = 2 cases the event E occurs (still keeping a =B=2). [These tests are expensive because they involve intentionally crashing cars at high speeds, which, of course, destroys the test cars in order to determine whether there will be a critical failure of the part being tested.] In Column C, calculate the values of the posterior probability density function for x = 0, .01, .02, ...., .99, 1.00 and graph it on the same chart as you graphed the prior probability density function. (b) Using the prior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%? Using the posterior distribution, what is the probability that the proportion of times the event E occurs is between 40% and 60%?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 16 images

Blurred answer
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman