Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help code the following in python. Thank you. - Write code that will generate three plots. Each of the plots will contain the same
Please help code the following in python. Thank you.
- Write code that will generate three plots. Each of the plots will contain the same x and y values as your first plot, but overlay on that plot a line for each of the three theta values. \#\#\#\# write your code for the plots below A probabilistic framework Recall our linear model written using probability: y=x+. The noise component is often modeled as a random variable drawn from a Gaussian distribution (also called the normal distribution). The Gaussian distribution is described by its probability density function (pdf) N(x;,2)=221e221(x)2 and is dependent on two parameters: the mean and the variance 2. Here, this is the general representation of the Gaussian with any mean and any variance. Let's consider two specific Gaussians in the linear regression framework. Let us first consider the noise, epsilon, to be Gaussian "white noise", with zero mean and unit variance: N(0,1). Now, y is also distributed according to a Gaussian. But here, the mean of y is =x and the variance is the same as the noise variance, 2=1 yN(x,1) which is to say that the probability of observing y given some x and parameter is p(yx,)=21e21(yx)2 Likelihood Estimation Now that we have our probabilistic model, we turn back to our original challenge of finding a good estimate for that fits our data. Given the inherent uncertainty when dealing in probabilities, we talk about the likelihood that some estimate ^ fits our data. The likelihood function for a single observation (that is, one x value and one y value), can be denoted as L() is equal to the probability density function parameterized by that : L(x,y)=p(yx,)=221e221(yx)2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started