Items tagged with distribution distribution Tagged Items Feed

with(Statistics):
X := RandomVariable(Normal(0, 1))

DensityPlot(X,filled=true)

I don't know why the plot doesn't produce a shaded plot.

 

Below is a custom distribution created based on a function that takes a parameter.

It is possible to create the custom distribution e.g. as D1 and then use it afterwards to find e.g. Mean, but it is not possible to call Mean directly with the creation of the distribution in the call.

Why is that ?

of a (concrete/general) triangle, making use of Maple tools in an efficient way?  Mathematica applies the barycentric coordinates and the Dirichlet distribution to this end. More generally, how to efficiently choose a random point in a given bounded region?

Is there a difference between these two? 

with(Statistics):

Sample(Normal(0,1),100)

Sample(RandomVariable(Normal(0, 1)), 100)

 

How to generate a random normal distribution of points around the point [3,15] for example?

Dear all

I have downloaded a third party Maple package from following link:

http://cpc.cs.qub.ac.uk/summaries/AEQP_v1_0.html

The distribution format is  "tar.gz", but I don't know what to with this format, that how should I load this package into Maple library. I have window 8.1.

If anybody have an idea about this format "tar.gz" please help me out.

Hi, 

 

  I have the following input

 

***

restart;
with( Statistics ):


a:=2;c:=0.3;
g:= exp(-a*x) + c*a*exp(-a*x);
#f := x -> piecewise( x < 0, 0, x>0, g );
 f :=x -> piecewise( x < 0, 0, x>0, exp(-a*x) + c*a*exp(-a*x));

norm_factor:=int( f(x), x=0..infinity );
print(norm_factor);


randomize():
F := Distribution( PDF = 1/norm_factor*f ):
X := RandomVariable( F ):


N := 20;
S := convert( Sample(X,N), list );

print(`cc`,S[1]);

***

 

The code works. However, if I comment out 

 f :=x -> piecewise( x < 0, 0, x>0, exp(-a*x) + c*a*exp(-a*x));

 , then use

f := x -> piecewise( x < 0, 0, x>0, g );

 

i.e.

f := x -> piecewise( x < 0, 0, x>0, g );
 #f :=x -> piecewise( x < 0, 0, x>0, exp(-a*x) + c*a*exp(-a*x));

 

It is said "

Error, (in Statistics:-Sample) unable to construct the envelopes for _R, try to specify the initial range"

 

The norm_factors are actually the same for both inputs. What is the reason for the error message?  Suppose I still want to use something like

f := x -> piecewise( x < 0, 0, x>0, g );

,how to fix the problem?

 

Thank you very much

 

 

I am trying to find the pdf of the inverse of a random variable X, that represents a distribution I defined. I currently have : 

with(Statistics):
T:=Distribution(PDF=(x->piecewise(0<x and x<1,1/4,3<x and x<5,3/8,0)));
X:=RandomVariable(T);
PDF(X,u);
CDF(X,u);
Y:=1/X;
T1:=RandomVariable(Y);

but this seems to be incorrect as I get a message saying T1:=RandomVariable(Y) is being passed a wrong argument. 

What is the right way to obtain the pdf of 1/X?

 

Hi,

 

  Suppose I have a probability distribution function f(x). I would like to generate points in a 

(1) given interval, can be up to infinity

(2) number of points

(3) satisfy the known probability distribution function f(x)

(4) possible other specifications

 

 

  Is there any build-in option in maple I could use? Or I have to write something manually?

 

Thank you very much!

 

This should be trivial but I am not able to figure out the right syntax to execute it

The pdf is given by :

f_X(x)={ 1/25 *x, 0<=x<5

             2/5 -x/25, 5<=x<10

             0, otherwise

I have tried to use the "CumulativeDistributiveFunction" so far

If I have some data, how would I determine the best normal distribution fit?

How to simulate a data which is follow by binomial distribution, n=200, p=0.9.

I know normal can be simulated by following code

random[normald[0, 1]](50)

Greetings, seeking an expert to animate a plot.

see worksheet.posterior_graphs_(encapsulted)_1D.mw

before they play each other, each have a law (a normal distribution) plot-output 6.

after DD defeats CC, and a numerical integration is performed the new laws are given by plot-output 18.

as you can see, the laws of DD and CC are closer together.

if the calc was repeated (DD defeats CC again), the laws would be closer again.

so what i require is an animation of the new laws from game 1 to (say) game 6 (DD defeats CC every time). seeing the red and blue distributions merging would be ideal.

as an aside I heard maples FFT could simplify the complicated integration. any suggestions?

cheers

Hello people in Mapleprimes,

 

I want to do calculations about an expected value.

For example,

expectedvalueofc.pdf

that is, \int_a^b c d \Omega

 

where, \Omega is a distribution function of c. 

 

But, I don't know whether this equation can be put into worksheet.

Is there no way other than writing this as 

\int_a^b c g(c) dc, 

where g shows a probability density function.

 

Can I use Statistics[ExpectedValue] to calculate expected value with a general distribution function, not specified 

to normal distribution?

 

I hope you will give me some hints.

 

Best wishes.

 

 

 

I want to integrate the following cumulative distribution function with variable bounds but maple returns the integral.

>with(Statistics);

>N := RandomVariable(Normal(0, 1)):

>a := (ln(98.53*(1/95))+(0.1e-1+.5*x^2)*.5)/(x*sqrt(.5))

>y:= CDF(N, a, inert = true);

How do i make maple return a function of x instead of an integral?

1 2 3 4 Page 1 of 4