4
$\begingroup$

I would like to construct a ProbabilityDistribution with a variable number of dimensions. I tried to use $Assumptions = x ∈ Vectors[d, Reals] so that the variable x would be an unspecified vector with $d$ dimensions. However, I found that I could not use {x[[1]], -∞, ∞} to define the ranges of each element of the vector.

I'm seeking to define a distribution similar to the multivariate T distribution, but want flexibility to modify the definition. So I like to use ProbabilityDistribution for the definition, rather than using a built-in distribution.

My question is what's the best way to define a vector variable, which can be used in ProbabilityDistribution as a variable for the range of each dimensions defined?

$\endgroup$
2
  • 2
    $\begingroup$ Something like: n = 3; ProbabilityDistribution[pdf, Sequence @@ Table[{x[i], -\[Infinity], \[Infinity]}, {i, n}]] ? $\endgroup$
    – JimB
    Mar 8, 2019 at 17:28
  • 1
    $\begingroup$ But I think that if you don't want to specify the dimension explicitly, then you'll probably need to do it with Product, Sum, etc. commands rather than ProbabilityDistribution. But I could certainly be wrong about that. Others can chime in. If leaving the dimensions unspecified is necessary, then maybe explaining why that's necessary would help someone make a constructive suggestion. $\endgroup$
    – JimB
    Mar 8, 2019 at 18:55

2 Answers 2

2
$\begingroup$

Vector variables are not supported in the Probability & Statistics framework as of now. So the dimensionality needs to be specified.

$\endgroup$
0
$\begingroup$

Thank you JimB, your suggestion worked well. Use of the Sequence function which strips a layer of lists is part of what I was having difficulty with. Here is a simple example of a multivariate normal with independent dimensions.

n = 3; 
IndMultiNormal = ProbabilityDistribution[
    Exp[-Table[x[i], {i, n}].Table[x[i], {i, n}]], 
    Sequence @@ Table[{x[i], -\[Infinity], \[Infinity]}, {i, n}]
] 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.