# Question:FHow can I set the attribute "Parameters" in a user defined Distribution?

## Question:FHow can I set the attribute "Parameters" in a user defined Distribution?

Maple

Here is a notional example of a user defined  Probability Distribution:

• One of the "attribute" or "property" (sorry but I don't know the correct word to use) in any known distribution (that is already implemented in Maple) is Parameters: an example is  provided for a Gaussian RV.

• In a first stage I define a simple Distribution named MyDist and declare X as a random variable of distribution MyDist.

• Then I decide to complete the definition of MyDist by adding the "property" Parameters.
I get an error I don't know how to get rid of.

Does anyone has any idea to fix that ?

PS: I browse the Statistics library to try and understand how this "property" is defined for a known distribution but I couldn't find any clue.

 > restart
 > with(Statistics):
 > G := RandomVariable(Normal(a, b)): attributes(G)[3]: exports(%); (attributes(G)[3]):-Parameters;
 (1)
 > MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma): X := RandomVariable(MyDist(m, V)); (Mean, Variance)(X);
 (2)
 > MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma, Parameters=[mu, Sigma]): Y := RandomVariable(MyDist(m, V));
 (3)
 >