Probability density function for the multivariate normal distribution
Octave source under GPL:
% mu = [40; 60];
% sigma = [100, 30; 30, 140];
isigma = inv(sigma);
detsigma = det(sigma);
coeff = 1/(2*pi*sqrt(detsigma));
for i=1:100
for j=1:100
x = [i;j];
xm = x - mu;
p(i,j) = exp(-0.5*xm'*isigma*xm);
end
end
p = p*coeff;
gnuplot source under GPL:
set xlabel "X"
set ylabel "Y"
set title "Multivariate Normal Distribution" 0, -5
set ticslevel 0
unset key
set style line 100 lt 5 lw 0.5
set pm3d solid hidden3d 100
set palette defined (0 0 0 1, 1 0.5 0.5 1, 3 1 1 1)
unset surface
set terminal png font "Arial" 16 size 1280, 800
set output "mvnd.png"
splot 'p'
ꯑꯌꯥꯕꯥ
I, the copyright holder of this work, hereby publish it under the following licenses:
ꯃꯥꯟꯅꯕꯥ ꯁꯥꯔꯨꯛ – ꯀꯔꯤꯒꯨꯝꯅ ꯅꯪꯅ ꯌꯥꯟꯁꯤꯟꯅꯔꯕ, ꯍꯣꯡꯗꯣꯛꯍꯟꯂꯕ, ꯅꯠꯇ꯭ꯔꯒ ꯄꯣꯠꯆꯪꯁꯤꯡ ꯁꯥꯒꯠꯂꯕꯗꯤ, ꯅꯪꯒꯤ ꯍꯣꯠꯅꯖꯃꯟ ꯑꯗꯨ ꯃꯁꯤꯒꯤ same or compatible licenseꯒꯤ
ꯃꯈꯥꯗ ꯎꯠꯀꯗꯕꯅꯤ ꯑꯁꯦꯡꯕ ꯑꯅꯧꯕ ꯱ ꯑꯣꯏꯅ ꯂꯧꯗꯨꯅ ꯫
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
ꯅꯪ ꯅꯁꯥꯅꯥ ꯃꯁꯤꯒꯤ ꯑꯌꯥꯕꯁꯤ ꯈꯟꯕꯥ ꯌꯥꯅꯤ ꯫
Captions
Add a one-line explanation of what this file represents
Probability density function for the multivariate normal distribution Created using Octave % mu = [40; 60]; % sigma = [100, 30; 30, 140]; isigma = inv(sigma); detsigma = det(sigma); coeff = 1/(2*pi*sqrt(detsigma)); for i=1:100 for j=1:100