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!