MATH 314 Homework 06
Due 2025-10-13 by 11:59pm
-
Type, using
inside your jupyter lab notebook, your solution to the likelihood problem for an Exponential distribution. -
Pick a member of the Rayleigh family of distributions by choosing a scale parameter
. a. Generate
Rayleigh random variables based on your choice of . Store these data as a variable named x
.b. Write a log-likelihood function in Python that takes two arguments:
theta
anddata
. Don't forget that most scientific software has functions for minimization, not maximization.c. Call the
scipy.optimize
functionminimize
on your log-likelihood function from b. above, to find the maximum likelihood estimate of your choice ofbased on the data you generated in a. d. Make a plot of the log-likelihood function with the data generated above as fixed.
-
Pick a member of the Normal family of distributions by choosing a location parameter
and a scale parameter . a. Generate
Normal random variables based on your choice of . Store these data as a variable named x
.b. Write a log-likelihood function in Python that takes two arguments:
theta
anddata
. Don't forget that most scientific software has functions for minimization, not maximization.c. Call the
scipy.optimize
functionminimize
on your log-likelihood function from b. above, to find the maximum likelihood estimate of your choice ofbased on the data you generated in a. Don't forget that you're now estimating two parameters, so the initial values of is specified as a numpy array of two numbers.