Question: Use Python 1) A die D has four sides with the following probabilities : p(1) = p(2) = 1/8, p(3) = 1/4, p(4)= 1/2. What

Use Python

1) A die D has four sides with the following probabilities : p(1) = p(2) = 1/8, p(3) = 1/4, p(4)= 1/2. What is the entropy of this distribution?

H = # your code

H

2) Which probability distribution of the four sides will maximize the entropy? What is the maximum entropy?

# p(1)=? , p(2)=?, p(3)=?, p(4)=?

H = # your code

H

3) A coin C1 has the probability distribution p(T) = p(H) = 1/2 Another coin C2 has the probability distribution p(T) = 3/4, p(H) = 1/4 What is the relative entropy (KullbackLeibler divergence ) from C2 to C1? What is the relative entropy (KullbackLeibler divergence ) from C1 to C2?

4) Generate a sample from a normal distribution with mean = 100 and standard deviation = 15. Bootstrap a sampling distribution from this sample, e.g, resample this sample 1000 times, and calculate a confidence interval (middle 95%) for the median of the population.

# Hint: random normal function takes (loc = 100, scale =15,size=100) as input

# use np.median()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!