Can someone explain how the mean and standard deviation are defined for normpdf from the following matlab example?

조회 수: 1 (최근 30일)
The code
prior1 = @(b1) normpdf(b1,0,20); % prior for intercept
prior2 = @(b2) normpdf(b2,0,20);
The mean is defined as 0 and the standard deviation is defined as 20. I know for a standard normal distribution the mean is defined as 0 and the standard deviation is 1. However it isn't explained how these the inputs 0 and 20 are obtained which is frustrating.
  댓글 수: 4
Adam
Adam 2015년 12월 8일
They are specific to that pdf, as you can see in the graph shown in that example. You can see the 20 standard deviation coming through in the halfwidth of the pdf. If you put 50 in then your half width would be around 50.

댓글을 달려면 로그인하십시오.

답변 (1개)

the cyclist
the cyclist 2015년 12월 8일
Ronan, I think that example assumes a certain amount of knowledge of Bayesian analysis. Maybe you have some of that knowledge, and maybe you don't.
The values you ask about parameterize the prior probability distribution. In this example, these values indicate that the analyst had evidence (maybe a prior experiment or literature) that the distribution with mean 0 and standard deviation of 20. They are a bit "out of the blue" here, but in a real application they would not be arbitrary. They would be driven by prior knowledge.
  댓글 수: 1
Ronan
Ronan 2015년 12월 10일
My knowledge of Bayesian analysis is pretty limited. I know its a bit of a random question. There were one or two things holding me back from applying this example and it is very beneficial to me if I can. Thank you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by