t 的累積分配與分位數
在這個練習中,你將計算多變量 t 分配的機率積分,以及其分位數(或反向 CDF)。
本練習屬於課程
R 的多變量機率分配
練習說明
- 對一個具有位置參數
mu.sim、變異—共變異矩陣sigma.sim、自由度為 5 的雙變量 t 分配,計算在 \(\begin{pmatrix} -5 \\ -5\end{pmatrix}\) 與 \(\begin{pmatrix} 5 \\ 5 \end{pmatrix}\) 之間的體積。 - 對標準雙變量 t 分配,在 \(p=.9\) 時計算等機率等高線。別忘了指定
tail = "both",以取得雙尾的等高線,其形式為 \(P[-x ≤ X ≤ x] = p.\)
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Calculate the volume under the specified t-distribution
pmvt(lower = ___, upper = ___, delta = mu.sim, df = 5, sigma = sigma.sim)
# Calculate the equal probability contour
qmvt(p = ___, tail = "both", sigma = diag(2))