1 Solve these problems after Lecture #4: Homework Set 2 1. Two dice are tossed; let X be the sum of the numbers appearing. a. Graph the CDF, FX(x), and the pdf, fx(x). b. Use the CDF to find: Pr(7 X 9). Check your answer using the pdf. 2. For the RV X described in problem 1, use you CDF and/or PDF (i.e., the answers from problem 1) to answer the following questions: a. Find Pr(X = 7). Ans: 1/6 b. Find Pr(X > 7). Ans: 5/12 3. If 4 dice are tossed simultaneously, find the CDF for the random variable Y representing the number of ones that appear. 4. Let X be U(-5, 15). a. Sketch FX(x) and fx(x). b. Find Pr(0 < X < ). c. Find Pr(5 < X < 10). d. Find Pr(X > 9) e. Use MATLAB to verify your sketch for f X (x) and to check the answers for b, c, and d. 5. A power supply has 5 intermittent loads, each drawing 2 W when operating. Each load operates ¼ of the time, independently of the other loads. a. Plot the CDF and PDF for the RV representing the power delivered, in Watts. b. If the power supply can deliver only 6W, what is the probability that the load requirement can t be met? 6. RV X has probability density function: fx(x) = A e -x, x > 1 0 else a. Find A. (Hint: recall that the area under the pdf must be:. Choose the scale factor A to yield the correct area.) b. Find Pr(1 < X < 2). c. Find and sketch the CDF.
2 7. RV X has pdf: fx(x) = Ax, 0 < x 4 A(8 x) 4 < x 8 0 else a. Find the scale factor, A. b. Find Pr(X 6) c. Find FX(x) 8. The circuit below has 2 switches (#1 and #2), each of which opens and closes randomly and independently of the other. Switch #1 is open at any point in time with probability ¼, and switch #2 is open at any point in time with probability ½. At a fixed point in time, we measure the current, I, in amps. a. Plot the probability density function, f I (i), for the random variable I. b. Plot the distribution function, F I (i). Hint: Find the current I for every possible combination of switch-positions, and find the associated probability for each combination of switch-positions. #1 #2 10 V 5K 5K 9. A 6-faced die is loaded (i.e., not fair) in such a way that the probability of a given number turning up is proportional to that number. (For example, a six is twice as likely as a three to appear when the die is tossed.) Let X be the random variable whose value is the number showing when the die is tossed. a. Find the probability of the event { X = 4 }. Ans: 4/21 b. Plot the probability density function for the random variable X. c. Graph the probability distribution (CDF) for the random variable X. 10. A random experiment consists of sending the same bit (either 0 or 1) over a communication channel three times. That is, I Message 0 is sent as: 0 0 0 Message 1 is sent as: 1 1 1 triple repetition code For each transmitted bit, the probability of error at the receiver is 0.2.
3 Let s say that message 0 is sent using the repetition code described above. Let X be a random variable representing the number of bits received in error. a. Graph the cumulative distribution function, F X (x). b. Now assume that the receiver does a majority vote on the received bits; that is, it decides: the transmitted message was 0 if at least 2 of the 3 bits received are 0 s; the transmitted message was 1 if at least 2 of the 3 bits received are 1 s. Find the probability that the receiver makes an error, still assuming that 0 was actually transmitted. c. Find the total probability of error. Solve these problems after Lecture #5: 11. Consider a Gaussian RV with mean 4 and standard deviation 2. a. Write the equation for the pdf. b. Use a table to find Pr(X > 0). c. Use a table to find Pr(X > 2). d. Check your answers for parts b and c with MATLAB s functions normcdf or qfunc. e. Use MATLAB to plot the pdf, f X (x), for the RV X, for x values in the interval (-4, 12). 12. Let X be a Gaussian RV. Suppose that 10% of the values of X are below 60, and 5% of the values are above 90. Find the mean and variance of X. 13. (Mix) At any point in time, the voltage at the output of an amplifier is normally distributed with mean 0 and variance 4. a. If the output voltage is measured at time t 1, find the probability that it is less than 2.4 Volts. b. A 3-volt battery is placed in series with the output, so that the dc level is raised to 3 volts. Now what is the probability that the voltage is less than 2.4 volts. 14. (Mix) A Gaussian RV X has mean 2 and variance 4. Use a table to find Pr(0 < X < 4). Then check your answers with MATLAB. 15. Let X be a Rayleigh random variable with probability density function
4 2 x x f X (x) = exp u( x) 4 8 a. Find the probability that X is greater than 2. b. Find the probability that X = 2. c. Use MATLAB s function raylcdf function to check your answer for part a. (Type: >> help raylcdf). d. Use MATLAB s function raylpdf to plot the pdf for the RV X. Choose a reasonable range of x values to insure that you have included the bulk of the pdf. 16. Let X be a Gaussian random variable with mean 1 and variance 4. Use tables to find a. Pr(X < 2) b. Pr(-2 < X < 2) Then check your answers with MATLAB. (Beyond Lecture 5) 17. The MATLAB function rand can be used to generate pseudo-random numbers (variates) between 0 and 1, with no value being more likely than any other in other words, uniformly distributed. (Type: >> help rand) Example: >> rand ans = 0.9501 Modify the function to generate a. pseudo-random numbers between 0 and 5. b. pseudo-random numbers between 3 and 5 c. pseudo-random numbers between 10 and 100 keeping the uniform distribution 18. For the RV described in problem 9, compute the conditional probability Pr{ X = 6 X is even }. Ans: 1/2 19. Consider a factory with a fire warning system that transmits a 10-volt signal to indicate that a fire is present. In case of fire, the fire station receives the 10-volt signal plus Gaussian noise, with mean 0 and variance 3 (V 2 ). Otherwise, the fire station receives noise only. In other words, the total received voltage level can be modeled as a conditional random variable, R:
5 f R (r fire) = f R (r no fire) = The fire station alarm will sound whenever the received voltage level exceeds the threshold, which is set at 5 volts. a. Find the probability of a false alarm; that is, the probability that the alarm will sound when there is no fire. b. Find the probability that the fire station alarm will sound if there actually is a fire in the factory. Suppose that the fire station monitors samples from the received voltage signal taken at rate f s = 10 samples/min. c. Use MATLAB to generate a sequence of samples from r, say x(t), taken over a period of 1 hour assuming there is no fire at the factory. d. Use MATLAB to generate a sequence of samples from r, say y(t), taken over a period of 1 hour assuming there is a fire at the factory. e. Use MATLAB to plot x(t) and y(t) on a single graph; on the same graph, plot the 5-volt threshold. f. Use MATLAB to generate 2 histograms, one for the voltage samples x and one for the samples y. (In MATLAB, type >> help histogram to learn how to do this. Also see the class notes pertaining to histograms.) 20. Consider a system consisting of an inverting amplifier with a gain of 2, and a d.c. offset of 1: 1 X 2 Y = -2X + 1 Let X be the input, and suppose that X is an exponential random variable with mean 2.
6 a. Find Pr(X < 2). b. Find the mean of the output random variable, Y. Ans: -3 c. Find the variance of the output random variable, Y. d. Find f Y (y) for all values of y. e. Find Pr(Y < -3). 21. Let X be the random variable described in problem 1. Find the mean, variance and standard deviation of X. 22. Let X be a uniformly distributed random variable on the interval (3, 5). Find the mean, variance, and standard deviation of X. 23. Suppose that the probability density function for a random variable X is given by 2 1 (x 2) f X (x) = exp 2 2 Find the mean, variance, and standard deviation of X. Then find Pr(X < 3). 24. Consider the random variable X with pdf shown: f X (x) c -1 1 x a. Find the value for c. b. Find E(X) and E(X 2 ). c. Find Pr( X <.5) d. Find f X (x X <.5) e. Find E(X X <.5) 25. Suppose that the random variable X given in problem 16 is input to a cubelaw device with transfer function Y = 4X 3. Find a. E(Y) b. E(Y 2 ) c. f Y (y) 26. Find the mean of the random variable X given in problem 15. 27. Find the characteristic function for the random variable given in problem 1. 28. If X is N(0, 4), a. find the pdf of Y = 5X 4. b. find the pdf of Y = X.
7 29. Suppose that the duration in minutes of a long-distance phone call is exponentially distributed, with probability density function: f(x) =.2 exp(-x/5), x > 0. Find the probability that the duration of a phone call a. be less than 2 minutes. b. will be between 5 and 6 minutes. c. Use MATLAB s function expcdf to verify your answers for a and b. 30. A machine produces bolts the length of which (in cm.) is normally distributed with mean 5 and standard deviation = 0.3. A bolt is called defective if its length falls outside the interval (4.8, 5.2). a. What is the proportion of defective bolts produced? b. What is the probability that among 10 bolts produced by this machine, none will be defective?