I was just wondering, when I call the CopulaDistribution function in Mathematica, am I calling its cumulative function or its density function?

I have looked up the help and am still a little bit unsure.

EDIT: In particular, what does it mean when I take a RandomVariate from this CopulaDistribution? Surely I would have to sample from either the CDF or PDF.

## closed as off-topic by Rojo, Öskå, Michael E2, WReach, VerbeiaJan 1 '15 at 22:58

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Neither. A distribution is a distribution and its cumulative function and density function can be thought of as properties of that distribution which you can get at using the function CDF and PDF, respectively. – Sjoerd C. de Vries Dec 22 '14 at 7:13
• So if I do RandomVariate[CopulaDistribution[...]], what essentially am I doing? – Jim Dec 22 '14 at 7:15
• You are drawing random numbers from the copuladistribution with the given parameters. A histogram of those numbers will look like its PDF and the cumulation of those numbers will look like its CDF. – Sjoerd C. de Vries Dec 22 '14 at 7:18
• This question appears to be off-topic because it is more about the poster's unfamiliarity with distribution/PDF/CDF terminology than with their implementation in Mathematica. – Sjoerd C. de Vries Dec 22 '14 at 10:46
• This question appears to be off-topic because it is about the poster's unfamiliarity with distribution/PDF/CDF terminology than with their implementation in Mathematica – Rojo Dec 30 '14 at 1:50

The question is of some interest because it captures rather nicely the difference between:

A. mathematical statistics ... where we work with characterisations of distributions, such as starting with a pdf, or cdf, or cf ... e.g. Let $X$ be a random variable with pdf $f(x)$:

$$f(x) = 1 -|x| \quad \text{for}\quad x\in(-1,1)$$

and

B. Mathematica's implementation of distributions ... which defines black box names to distributions that return nothing themselves ... but which we can then ask for a PDF or CDF or other characterisation from.

In this regard:

• The poster asks whether CopulaDistribution returns the pdf or the cdf? And the answer is neither.

• What does it return? Generally nothing.

Rather, CopulaDistribution .... like TransformedDistribution or MarginalDistribution, ... are Mathematica functions that don't actually seem to do anything. Do they involve any computation? No. Do they take up any processing cycles? No. They just return exactly what you enter e.g.

CopulaDistribution[{"FGM", .2}, {NormalDistribution[-1, 2], NormalDistribution[1, 1/2]}]


returns instantly:

CopulaDistribution[{"FGM", .2}, {NormalDistribution[-1, 2], NormalDistribution[1, 1/2]}]

Similarly:

TransformedDistribution[x^4, x \[Distributed] NormalDistribution[0, 1]


returns instantly the same input we entered ...

TransformedDistribution[x^4, x [Distributed] NormalDistribution[0, 1]

It doesn't even try to compute anything.

The only exception to this, that I am aware of, is where the solution is written up in advance ... much like a textbook appendix. So, for example:

TransformedDistribution[x^2, x \[Distributed] NormalDistribution[0, 1]]


ChiSquareDistribution[1]

... but no calculation or derivation is involved in this. It is just an appendix lookup (which is actually rather un-Mathematica-like, in my view).

RE comments: I don't know what is meant by a 'distribution is a distribution', and I think it is inherently wrong to suggest that distributions are black boxes, because it is not the way we tend to work or think about distributions in mathematical statistics. The starting point in mathematical statistics is not to define a black box, but to define a pdf (or a cdf or a cf). In effect, this is what Mathematica ultimately has to do anyway when we define our own custom density ... except that you have to manually create this artificial black box or placeholder, using:

dist = ProbabilityDistribution[1 - Abs[x], {x, -1, 1}]


ProbabilityDistribution[1 - Abs[x], {x, -1, 1}]

or CopulaDistribution or MarginalDistribution or ...

Once the black box is created, you can then 'operate' on it using PDF or CDF etc. The same goes for CopulaDistribution ... you have created a black box, and if you want something calculated, you will have to apply PDF or CDF etc to the latter.

• The last example has a typo "Abx" instead of "Abs", which explains the error. – Romke Bontekoe Dec 22 '14 at 15:38
• I would argue its not quite true to claim that mathematica returns the same as the input: it uses mute variables, which is reassuring as it shows it understood the input. – chris Dec 22 '14 at 15:46
• @RomkeBontekoe Fixed typo - thanks. – wolfies Dec 22 '14 at 15:48
• What if I call on the RandomVariate of this CopulaDistribution. Am I taking a random variate of the CDF or the PDF? – Jim Dec 22 '14 at 22:05
• You would be generating a pseudorandom sample from the distribution. If you generated a large number of such samples, the empirical pdf of your samples (or histogram of your samples) would resemble the pdf. – wolfies Dec 23 '14 at 3:49

I recently asked WRI about a similar behaviour on probability distributions. The answer was that the output IS generated, but erroneously the result IS NOT displayed.

Try

dist = ProbabilityDistribution[1 - Abs[x], {x, -1, 1}]


with

Mean[dist]


(* out 0 *)

or

cdist = CopulaDistribution[{"FGM", .2}, {NormalDistribution[-1, 2],
NormalDistribution[1, 1/2]}]


with

Mean[cdist]
Variance[cdist]


(* out {-1, 1} and {4, 1/4} *)

So it does work. However, it is confusing.

• but dist=ProbabilityDistribution[1 - Abs[x], {x, -1, 1}] does return something which is different from the input. – chris Dec 22 '14 at 15:59
• The reason for my down vote is that I don't feel this addresses the question at hand and would be more fitting as a comment or in chat. – Andy Ross Dec 23 '14 at 22:34