How to calculate the estimation of Gaussian distribution through Matlab?
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm learning probability recently. When trying to verify the estimation of Gaussian distribution, which equals to the mean of distribution, I have some problems. I used the code as following:
clc;clear; syms x sigm mu; fx = 1/(sqrt(2*pi)*sigm)*exp(-(x-mu)^2/(2*sigm^2))*x; int(fx,x,-inf,inf)
with the result: ans =
-(2251799813685248*(limit((2^(1/2)*pi^(1/2)*mu*erfi((2^(1/2)*(x - mu)*(-1/sigm^2)^(1/2))/2))/(2*(-1/sigm^2)^(1/2)) - sigm^2*exp(-x^2/(2*sigm^2))*exp((x*mu)/sigm^2)*exp(-mu^2/(2*sigm^2)), x == -Inf) - limit((2^(1/2)*pi^(1/2)*mu*erfi((2^(1/2)*(x - mu)*(-1/sigm^2)^(1/2))/2))/(2*(-1/sigm^2)^(1/2)) - sigm^2*exp(-x^2/(2*sigm^2))*exp((x*mu)/sigm^2)*exp(-mu^2/(2*sigm^2)), x == Inf)))/(5644425081792261*sigm)
shouldn't it be mu?
Thanks a lot!
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!