Multivariate Wahrscheinlichkeitsverteilungen in R
Surajit Ray
Professor, University of Glasgow
Eindimensionale Normalverteilung mit Mittelwert 2 und Varianz 1
Dichteform einer zweidimensionalen Normalverteilung

${\mu}={\begin{pmatrix} 1 \\ 2 \end{pmatrix}},\quad { \Sigma }={\begin{pmatrix} 1 & 0.5 \\ 0.5 & 2 \end{pmatrix}}$

${\mu}={\begin{pmatrix} 1 \\ 2 \end{pmatrix}},\quad { \Sigma }={\begin{pmatrix} 1 & 0.5 \\ 0.5 & 2 \end{pmatrix}}$

${\mu}={\begin{pmatrix} -1 \\ -3 \end{pmatrix}},\quad { \Sigma }={\begin{pmatrix} 1 & 0.5 \\ 0.5 & 2 \end{pmatrix}}$

${\mu}={\begin{pmatrix}\phantom{-}1 \\\phantom{-}2 \end{pmatrix}} ,\quad { \Sigma }={\begin{pmatrix}2 & 0 \\ 0 & 2 \end{pmatrix}}$

${\mu}={\begin{pmatrix}\phantom{-}1 \\\phantom{-}2 \end{pmatrix}},\quad { \Sigma }={\begin{pmatrix}1& 0.95 \\0.95 & 1 \end{pmatrix}}$



p für „probability"q für „quantile"d für „density"r für „random"library(mvtnorm)
rmvnorm(n, mean , sigma)
Anzugeben sind:
n die Anzahl der Stichprobenmean der Mittelwert der Verteilungsigma die Varianz-Kovarianz-MatrixErzeuge 1000 Stichproben aus einer 3-dimensionalen Normalverteilung mit
$$ \mu= \begin{pmatrix} 1 \\ 2 \\ -5 \end{pmatrix} \Sigma={\begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & 5 \end{pmatrix}} $$
mu1 <- c(1, 2, -5)
sigma1 <- matrix(c(1,1,0,
1,2,0,
0,0,5),3,3)
set.seed(34)
rmvnorm(n = 1000, mean = mu1, sigma = sigma1)
Plot der generierten Stichproben

Multivariate Wahrscheinlichkeitsverteilungen in R