Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3661584
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:19:17+00:00 2026-05-19T01:19:17+00:00

I was trying to program the algorithm for the cdf for the multivariate t-distribution

  • 0

I was trying to program the algorithm for the cdf for the multivariate t-distribution following Genz and Bretz, The reference package in R is mvtnorm.

When I was testing my function, I found that my numbers don’t match up. In the following example, adjusted from the mvtnorm help, the multivariate t random variable has independent components. So the integral should be just the product of 3 independent probabilities

> lower <- -1
> upper <- 3
> df <- 4
> corr <- diag(3)
> delta <- rep(0, 3)
> pmvt(lower=lower, upper=upper, delta=delta, df=df, corr=corr)
[1] 0.5300413
attr(,"error")
[1] 4.321136e-05
attr(,"msg")
[1] "Normal Completion"

The reported error is 4e-5, the error compared to the product of independent probabilities

> (pt(upper, df) - pt(lower, df))**3
[1] 0.4988254

is

0.5300413 – 0.4988254 = 0.0312159

I’m getting discrepancies in my own code compared to R mvtnorm for various examples in about the same range.

I’m mostly a beginner in R. So, what am I doing wrong or what is wrong?

(I’m not signed up on a R-help mailing list, so I try here.)

UPDATE: As pchalasani explained, my statistics was wrong, the bug in my own code was in some helper function not in the t distribution code.
A good way of seeing that being uncorrelated does not imply independence, is looking at the conditional distribution.
Here are the column frequencies %*100 for independent a bivariate random variable (10000 samples) for quartiles (distribution conditional on column variable).

bivariate uncorrelated normal variates

([[26, 25, 24, 23],
  [24, 23, 24, 25],
  [24, 27, 24, 24],
  [24, 23, 26, 25]])

bivariate uncorrelated t variates

([[29, 20, 22, 29],
  [20, 31, 28, 21],
  [20, 29, 29, 20],
  [29, 18, 18, 29]])

The distribution in the first and last column is very different from the middle columns.
(Sorry, no R code, since I don’t know how to do this quickly with R.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:19:18+00:00Added an answer on May 19, 2026 at 1:19 am

    Zero Correlation does not imply independence, for jointly non-Gaussian distributed random variables!

    Let me elaborate: there is no bug here. The flaw lies in your assumption that when the multivariate Student-t random variables are uncorrelated, they are also independent, which is definitely not the case: the only class of multiavariate distributions where no correlation implies independence, is the MV Gaussian distribution.

    To see that two uncorrelated random variables that jointly follow a MV Student-T distribution are not independent, consider the case of n=2:

    require(mvtnorm)
    x <- rmvt(100000, sigma = diag(2), df=4, delta = rep(0,2) )
    

    Now each column of x represents realizations of the two random variables. We first check that their correlation is fairly small:

    > cor(x[,1], x[,2])
    [1] -0.003378811
    

    However the correlation of the squares of x[,1] and x[,2] is as high as 30.4%, i.e., definitely not zero, proving that x[,1] and x[,2] are not statistically independent:

    > cor(x[,1]^2, x[,2]^2)
    [1] 0.3042684
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to program a noise reduction algorithm that works with a set
I'm trying to create a c program that implements the radon transform algorithm. I
I am trying to program the quicksort algorithm from Cormen Algorithm Textbook. Below is
I am trying to implement Quick Sort algorithm. Following code works for unique elements
I am trying to implement non-uniform probability distribution in genetic algorithm. In the implementation
I'm trying to make a program using the BFS algorithm so I put every
I trying to implement synchronization algorithm in C#, without success. Why isn't the following
I am trying to implement an algorithm I found in C# in javaScript and
I'm trying to program a quicksort-ish algorithm using the Dutch national flag algorithm .
I am trying to make an algorithm for the following task: I have two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.