Anda di halaman 1dari 2

Middle East Technical University Department of Electrical and Electronics Engineering EE230: Probability and Random Variables Homework

2 Due: March 26, 2014 Please recall that this is a group HW. Each group will have only one submission.You will be provided a Word template for your HW submissions. You are supposed to make use of the template for online submission. 1. A probabilistic experiment has a sample space with 9 equally likely outcomes: = {bb, hb, hbh, hbb, hh, bbh, ah, aha, bah}. Let X be the number of bs in the outcome and Y be the number of hs. (a) By showing the mappings between the outcomes in the sample space and the random variables explicitly, nd i. the PMF of X ii. the PMF of Y iii. the joint PMF of X and Y . (b) Dene a new random variable Z which is 1 if XY > 0 and zero otherwise. What is the event {Z = 1} {Y = 1}? (c) Find the PMF and expected value of Z . 2. In a probabilistic experiment, the outcomes take the form of a sequence where numbers 1, 2, 3, 4 are written in an arbitrary order (without repetition). (a) What is the sample space for this experiment? Find the probability of singletons if all the singletons are equally likely? (Hint: Reading part b may clarify the experiment) (b) A random variable X is dened for this probabilistic experiment in the following way. The given outcome is compared to the sequence 1234. The numbers whose locations match are counted and X is set as the count. (Ex: 1243 to 2, 2314 is mapped to 1.) Write down the events {X = 2} and {X = 4}. (c) Find the PMF of X . (d) If this experiment is repeated ten times (independent of the previous trials), what is the probability that the random variable equals 1 in all ten trials? 3. The voltage reading from a digital circuit is random. Let us model it as a random variable X which takes integer values from 4 to 4 with the following PMF: pX (k ) = c|k |, if k {4, . . . , 4}, 0, o.w.

(a) Determine the value of c and the probability P (X > 0). (b) Dene a new random variable (to be used in digital 1, Y = g (X ), g (x) = 0, 1, Determine pY (k ). computations of the circuit) if x 4, if 3 x 1, if x 2.

(c) Dene another random variable Z = XY . Determine its PMF and expected value. (Hint: Z is a function of X .) 4. Random variables X and Y take only integer values, and the joint PMF of X and Y is as follows. pX,Y (x, y ) = a, x2 + y 2 5 0, otherwise

(a) Determine the constant a and the marginal PMFs. (b) Determine P (X 1) and P (X Y ). (c) Let Z = X 2 + Y 2 . Determine pZ (z ) and E [Z ]. 5. In this problem, we will use Matlab to plot several PMFs and compute their means and variances. (a) First, from the Help menu of Matlab window, select Product Help, and in the new window that opens, type pdf to search and read the documentation of the pdf() command. you can see that the pdf() command can provide PMF values for many random variables including the ones we learned in class. (b) Run the MATLAB code provided below to plot the PMF of a Binomial random variable and to compute its mean and variance. Provide the plot. Now run the same code for p = 0.2 and provide the plot you obtain with this parameter as well. (c) Modify the provided script so that you plot the PMF of a discrete uniform random variable dened on the integers in [2, 6] and compute its mean and variance. Provide the plot. (d) (Optional) Modify the provided script so that you plot the PMF of a Poisson random variable with parameter = 2 and compute its mean and variance. Provide the plot.

MATLAB CODE
1 2 3 4 5 6

% p n k

Determine p a r a m e t e r s o f Binomial PMF = 0.35 ; = 10 ; = 0:10 ;

7 8 9 10 11 12 13 14 15 16 17 18 19

% Use pdf ( ) f u n c t i o n i n Matlab t o g e t PMF v a l u e s o f Binomial PMF a t r e q u i r e d points pXk = pdf ( b i n o , k , n , p ) ; % Compute Expected Value ExpVal = sum ( k . pXk ) ; % Compute V a r i a n c e Var = sum ( ( kExpVal ) . 2 . pXk ) ; % P l o t PMF and l a b e l a x e s f i g u r e , bar ( k , pXk) ; g r i d ; x l a b e l ( k ) ; y l a b e l ( p X ( k ) ) % Put a t i t l e on p l o t t i t l e ( s p r i n t f ( PMF o f Binomial r . v . with n=%d , p=%2.2 f , E [X]=%3.2 f , var (X) =%3.2 f , n , p , ExpVal , Var ) ) ;

Anda mungkin juga menyukai