6

Let's break this down into easier problems. To keep the post reasonably short, I will only sketch a good confidence interval procedure without going into all the details. What is interesting about this situation is that because $Y$ varies in such a complex, nonlinear fashion with the distribution parameters, a careful analysis and special solution are ...


4

As indicated in the previous answer, this linearity with a fixed weight holds when the model is Gaussian with unknown mean and the prior is the conjugate Gaussian model. This is essentially the representative case as the fact that the posterior expectation only depends of the data through the MLE is a form of sufficiency of the MLE that does not stand ...


3

The difference is that for navie Bayes you are calculating conditional probability $p(x_j|C_i)$, so you need to calculate the probability that $X=x_j$ given that $C_i=1$. With binary $r_i$ variables you count only such events (multiply by zeros and ones) and divide by number of such cases (sum ones). The conditional probability $p(x_j|C_i)$ together with ...


3

The posterior point estimate is a weighted combination of the prior point estimate, $\frac{a^0_H}{a^0_H+a^0_T}$, and the maximum likelihood estimate $\frac{n_H}{n_H+n_T}$. The weights are simply $\omega_{\text{Prior}} = \frac{n_{\text{Prior}}}{n_{\text{Prior}} + n_{\text{Lik}}}$ and $\omega_{\text{Lik}} = \frac{n_{\text{Lik}}}{n_{\text{Prior}} + n_{\text{Lik}...


3

This is a late response but I hope it may help: Proof (this proof is basically a summary of the explanations from the author): To go for the proof, first we can follow the procedure given by the author which allows us to have a more convenient expression: $$\begin{aligned} \theta_{ML} &=\arg \max_\theta p_{model}(\mathbb{X};\theta)\\ &= \arg\max_\...


2

Following your points: Yes, it is correct that the logistic regression does not generally optimises the accuracy. I would only say that the logistic regression estimates the conditional likelihood rather than the joint likelihood (this follows from the fact that the logistic regression ignores the marginal distribution of each class). If you want to ...


2

I think you have a minor confusion on Bayesian and Frequentist paradigms. The particular case you are referring to is inference over $\mu$ for $x_i \sim N( \mu , \sigma^2 )$ with $\sigma^2$ is known. In this case, which belongs to an example of conjugate families , the posterior mean ($\mu_p$) from the posterior distribution becomes a convex combination ...


2

Poisson rate $\lambda$ for number $B$ of purchases each day. Conditionally, on $B = b$ purchases in a day, the number of returns is $R \sim \mathsf{Binom}(b, p),$ where $p$ is the probability an item will be returned. Suppose we have data for $250$ days, $\lambda = 5,\; p = 0.1.$ Here is a simulation of purchases and returns: set.seed(2020) b = rpois(250, 5) ...


2

Loosely speaking, the MAP uses the prior distribution to augment your observed sample, so in addition to calculating, say, $\bar{x}$ for the data, you estimate the population $\mu$ by including the prior distribution. They’re different estimation methods. They should give different results, at least in some cases.


2

The priors are separate from the likelihood function in Bayes' theorem; it is the very point of that theorem that you can separate the two (three, if you include the marginal distribution). So there is no difference between the likelihood function in frequentist maximum likelihood and the likelihood function in Bayes.


1

They are the same. The likelihood is $p(X|\theta)$ where $X$ is the data and $\theta$ is the parameter to be estimated, this term gives the probability of $X$ given $\theta$, so $p(\theta)$ (the prior) does not get involved. However the posterior probability,$\,\,p(\theta|X)$, does depend on $p(\theta)$ because $p(\theta|X) = \frac{p(X|\theta) p(\theta)}{p(X)...


1

Wikipedia on Naive Bayes says "A class's prior may be calculated by assuming equiprobable classes (i.e., priors = $1/K$ for $K$ classes), or by calculating an estimate for the class probability from the training set (i.e., priors = $N_k/N$ for $N$ total obs; $N_k$ obs with label $k$.)." It seems like you're expecting the second method (learned) and ...


1

You start at the definition of the (negative) log-likelihood $$\lambda = -\log P = -\log \prod_i p_i = -\sum_i\log p_i$$ where $P$ is the probability of observing the event that you observed (some lamps blew up and others did not). The big event that you observed consists of multiple small events, one for each lamp. Since lamps are independent, big event is ...


1

When the EM algorithm can be implemented, it is a natural approach for this type of marginal (or missing data) optimisation problem. In our book, Introducing Monte Carlo methods with R, there is an entire chapter on Monte Carlo optimisation, covering the optimisation of functions defined by integrals such as $$m(x) = \int p(x,y)\text{d}y$$by techniques such ...


1

Normally you have $P(X,Y,\theta)=P(Y|X,\theta)P(\theta|X)P(X)$, but $P(\theta|X)=P(\theta)$ is assumed because the true model parameter does not depend on data. And $P(X)$ doesn't matter like denominator because it's free of data. Best to say $$P(\theta|X,Y)\propto P(Y|X,\theta)P(\theta)$$


1

MLE chooses the $p$ that maximises the likelihood, which is $$P(\text{x successes out of 1000}|p)={1000\choose x}p^x(1-p)^{1000-x}$$ For some $x$, this expression is larger when $p=0.01$, and for other $x$, it's larger for $p=0.1$. So, try to solve for $P(x|p=0.01)=P(x|p=0.1)$ and find the decision boundary.


1

As an illustration, consider trying to estimate binomial $p$ with a known number $n$ of Bernoulli trials of which $x$ turn out to be successes. First, use small $n = 10,$ so that the MLE $\hat p = x/n$ may not be very accurate. The likelihood function is the PDF considered as a function of $p,$ for observed data. Let's use R to plot the likelihood function ...


1

A slightly more formal answer: Let $X, y$ be your training data. Let $k_a$, $k_b$ be two kernels you want to compare with parameter vectors $\theta_{k_a}$ and $\theta_{k_b}$. Now consider the sklearn python function (simplified version of the second print statement in the question) # X, y is the training data X, y = make_regression() def f(k): return ...


Only top voted, non community-wiki answers of a minimum length are eligible