for jj = 1 : 100
a = 1/2;
b = 1/2;
n = 100;
% Suppose X is beta-(a, b)
X = betarnd(a, b);
p = X;
Y1 = binornd(1, p.*ones(n,1));
Y2 = binornd(1, p.*ones(n,1));
k = Y1+Y2;
a_dash = 3/2;
b_dash = 3/2;
N = n;
z = 0;
Ane = zeros(n+1,1);
Ane(1) = 0;
res = zeros(jj,1);
for ii = 1:1:(N)
if k(ii) == 1
X = betarnd(a_dash, b_dash);
z = X;
Ane(ii+1) = z + Ane(ii) ;
%Y1 = binornd(1, p.*ones(n,1));
%Y2 = binornd(1, p.*ones(n,1));
end
end
res(jj) = Ane(n+1)
plot(res)
hold on
end
3. Use Matlab to check that if X is a Beta-(a,b) random variable with a =...
Let Y1, Y2, . .. , Yn be independent and identically distributed random variables such that for 0 < p < 1, P(Yi = 1) = p and P(H = 0) = q = 1-p. (Such random variables are called Bernoulli random variables.) a Find the moment-generating function for the Bernoulli random variable Y b Find the moment-generating function for W = Yit Ye+ … + . c What is the distribution of W? 1.
(2) Given two independent variables X1 and X2 having Bernoulli distribution with parameter p=1/3, let Y1 = 2X1 and Y2 = 2X2. Then A E[Y1 · Y2] = 2/9 BE[Y1 · Y2] = 4/9 C P[Y1 · Y2 = 0) = 1/9 D P[Y1 · Y2 = 0) = 2/9 (3) Let X and Y be two independent random variables having gaussian (normal) distribution with mean 0 and variance equal 2. Then: A P[X +Y > 2] > 0.5 B...
(Q6) The management at a fast-food outlet is interested in the joint behaviour of the random variables Yı, defined as the total time between a customer's arrival at the store and departure from the service window, and Y2, the time a customer waits in line before reaching the service window. Because Yſ includes the time a customer waits in line, we must have Yi > Y. The relative frequency distribution of observed values of Yi and Y2 can be modelled...
Use MATLAB to plot the cdf of X in part
(a).
.13. A random variable X has cdf: for x <0 Ex(x)-11-le-a for x 0. 4 (a) Plot the cdf and identify the type of random variable. (b) Find P[X s 2], PX 0), P[X < 0], P[2< X < 6], P[X > 10
Please answer from a-d
Problem 2. Let X be a random variable with one of the following cumulative distribution function. 1.2 1,2 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 -1.0 -0.5 0.0 0.5 1.0 1.5 2,0 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 X X Pick the correct cumulative distribution function plot and answer questions: Page 2 of 9 Write down the probability mass function and What is the PMF of X? A. Poisson (3...
Use this result without proof: if X and Y are two normal random variables with means ux and My respectively, and variances oź and oſ respectively, and Z = X+Y, Z is also a normal random variable with mean (ux + Hy) and variance (ox +og). a) Suppose Yı, Y2, Yz, Y4 and Y5 are all independent normal random variables, each with a mean of 1 and a variance of 5. What is the probability that (Y1 + 2Y2 +...
Question 3 [25] , Yn denote a random sample of size n from a Let Y, Y2, population with an exponential distribution whose density is given by y > 0 if o, otherwise -E70 cumulative distribution function f(y) L ..,Y} denotes the smallest order statistics, show that Y1) = min{Y1, =nYa) 3.1 show that = nY1) is an unbiased estimator for 0. /12/ /13/ 3.2 find the mean square error for MSE(e). 2 f-llays Iat-k)-at 1-P Question 4[25] 4.1 Distinguish...
Please answer from b-d as
priority!
Problem 2. Let X be a random variable with one of the following cumulative distribution function. 1.2 1.2 1.0 1.0 0.8 0.8 0.6 0.6 0.4 F 0.4 0.2 0.2 0.0 0.0 -1.0 -0.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 X Pick the correct cumulative distribution function plot and answer questions: Page 2 of 9 (3 pts) Write down the probability mass function and What is the PMF of...
Find Pr[2 5B(15,.1) <3] . That is, if X is a binomial random variable counting successes on n=15 Bernoulli trials with p=.1, find the probability that x is between 2 and 3, inclusive. O A.0.3954 O B. 0.1286 O c.1.7604 O d. 0.4383 O E.0.1714
Question 3: A random variable X has a Bernoulli distribution with parameter θ є (0,1) if X {0,1} and P(X-1)-θ. Suppose that we have nd random variables y, x, following a Bernoulli(0) distribution and observed values y1,... . Jn a) Show that EIX) θ and Var[X] θ(1-0). b) Let θ = ỹ = (yit . .-+ yn)/n. Show that θ is unbiased for θ and compute its variance. c) Let θ-(yit . . . +yn + 1)/(n + 2) (this...