Description
Instructions:
• You should write the solutions on your own and honorably acknowledge the sources if any. Dishonest behaviour and cheating in the assignment will be penalized with extreme measures. See: https://www.cse.iitk.ac.in/pages/AntiCheatingPolicy.html.
2. The program file for part (a) of Question 4 with the name [Your roll number]_Q4 (with extension .py, .c etc according to your choice of the programming language).
3. A readme document explaining how the program file can be executed.
1. A company asks you to set up a mechanism to send single bits (0 or 1) between two points A and B. The company has n identical communication channels available. However, these channels are not perfect. Each of these channels flips the bits send through it (0 becomes 1 or 1 becomes 0) with probability p. The company gives you two options for using these channels to connect A and B: either the channels can be connected in series between A and B or they can be connected in parallel between A and B. In the series mode, the output of the channel at the receiving end is taken as the received bit, while in the parallel mode, the bit which appears in the majority of the channel outputs is taken as the received bit. Answer the following questions:
and n = 5, which mode of connecting the channels maximizes the probability that
the correct bit is received at the receiving end?
(b) Assume that and the parallel mode is used for connecting A and B. A chooses the bit 0 with probability and the bit 1 with probability and sends this random bit to B. The majority of the bits received at B turns out to be equal to 1. Given this fact, what is the probability that the original bit sent by A was also equal to 1?
[15+15=30 marks] 2. Suppose U is a continuous random variable with the probability density function (c ∈ R)
( .
g(u) =
0, otherwise.
(a) Find the constant c.
(b) The cumulative distribution function of a random variable X is the function FX(x) = P(X ≤
x) for every x ∈ R. Find the cumulative distribution function FU of U.
(c) Evaluate the conditional probability Pr( .
[10+10+10=30 marks]
3. Alice has an unbiased 5-sided die and 5 different coins with her. The probabilities of obtaining a head on tosses of these coins are and respectively. She likes to observe patterns in subsequent tosses of these coins. Alice performs the following experiment. She rolls the 5-sided die and if the ith side turns up, she chooses the ith coin and starts tossing this coin repeatedly.
(a) What is the expected number of tosses required for obtaining 6 consecutive heads given that the side 1 turned up during the roll of the die?
(b) What is the expected number of tosses required for obtaining 6 consecutive heads while performing this random experiment?
(c) What is the probability that in the first n tosses, she obtains n consecutive heads?
(d) In the first n-tosses, she obtains n consecutive heads. Given this outcome, calculate the probability that the ith side turned up during the roll of the die (the closed form expression for arbitrary i). How does these probabilities behave as n → ∞?
[10+5+5+10=30 marks]
4. In this programming exercise, let us explore the behavior of the averages,
of independent and identically distributed random variables Xi as n → ∞.
(a) Implement the following program using any language and graph plotting library of your choice (You are encouraged to use Python with Matplotlib for this assignment). Consider the random variable X which takes the values 0,1,2,3,…m−1 with the respective probabilities p0,p1,p2,p3 …pm−1 such that p0 + p1 + p2 + p3 ··· + pm−1 = 1. Your program should take as inputs, the value m, the probabilities p0,p1,p2,p3 …pm−1 and n which is the number of samples to be generated. Generate n samples according to the distribution of X and calculate the average value of the samples generated. Repeat this sampling and averaging process for a fairly large number of iterations and store the average values obtained. Round each of the average values to the nearest integer and generate a plot of the frequency of the rounded averages thus obtained against the range of possible values.
The above programs should be included in the submitted .zip file with the name [Your roll number]_Q4 and the appropriate extension according to your choice of the programming language (for e.g. 20xxxx_Q4.py). You should also include a readme document explaining how this program can be executed.
(b) The following questions should be answered in your main answer script. Give a brief account of how you implemented random sampling according to the required distributions in your program. Also, use your program to answer the following questions:
i. How does the frequency plot of the averages behave as n → ∞?
ii. Does the shape of the frequency plot change on varying m or the values of the probabilities? Can you interpret the shape of the plots for these distributions in terms of any of the concepts that were discussed in class?
[20+10=30 marks]
2




Reviews
There are no reviews yet.