Created
October 16, 2015 12:04
-
-
Save hyamamoto/cd21f5d413b345d1a22a to your computer and use it in GitHub Desktop.
Self-study note: Multivariate Analysis with Mathmatica. (Multinomial distribution)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 10; | |
p1 = 0.3; | |
p2 = 0.4; | |
ListPointPlot3D[ | |
Table[ | |
( | |
Factorial[n] /(Factorial[y1]*Factorial[y2]*Factorial[n - y1 - y2]) | |
) * p1^y1* p2^y2* (1 - p1 - p2)^(n - y1 - y2), | |
{y1, 0, n}, | |
{y2, 0, n} | |
], | |
Filling -> Axis, | |
PlotRange -> All, | |
FillingStyle -> Thickness[0.008] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = 0.5; | |
Plot3D[ | |
PDF[ | |
BinormalDistribution[ | |
{0, 0}, {1, 1}, r | |
], {x, y} | |
], {x, -3, 3}, {y, -3, 3}, PlotRange -> All | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment