Josolumoh

25 Reputation

3 Badges

8 years, 354 days

MaplePrimes Activity


These are replies submitted by Josolumoh

@Carl Love 

 

I wish I was able to do it. But, unfortunately, I could not.

The "Help file" has not help!

Pls, accept my programming level.

 

When I used this:

ExportMatrix(Datagen, M, target = csv, format = rectangular)

There was no error but could not fill-in the data generated- all were still zeros. 

 

Please, help me out.

@Carl Love 

 

 

 

restart;

B := proc (x) options operator, arrow; binomial(n, x)*p^x*(1-p)^(n-x) end proc;

B1 := Statistics:-Distribution(

   Type = discrete,  

    ProbabilityFunction = B,  

    Support = 0 .. n,

    DiscreteValueMap = (proc (n) options operator, arrow; n end proc)

);

(n, p) := (23, 1/3);

M := Matrix(50, 20, datatype = float[8]);

Statistics:-Sample(B1, 50, method = [discrete, range = 0 .. 25]);

ExportMatrix(Datagen, M, ... )

 

 

 

When I run the above syntax; I got this error!

Error, invalid input: too many and/or wrong type of arguments passed to ExportMatrix; first unused argument is () .. ()

 

@Carl Love 

 

I use Maple 2015.

 

Here is the error.

Error, invalid input: ExportMatrix expects its 1st argument, F, to be of type {string, symbol}, but received Matrix(50, 20, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = .0, (1, 8) = .0, (1, 9) = .0, (1, 10) = .0, (1, 11) = .0, (1, 12) = .0, (1, 13) = .0, (1, 14) = .0, (1, 15) = .0, (1, 16) = .0, (1, 17) = .0, (1, 18) = .0, (1, 19) = .0, (1, 20) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (2, 8) = .0, (2, 9) = .0, (2, 10) = .0, (2, 11) = .0, (2, 12) = .0, (2, 13) = .0, (2, 14) = .0, (2, 15) = .0, (2, 16) = .0, (2, 17) = .0, (2, 18) = .0, (2, 19) = ...

@Rouben Rostamian  

 

You made my day!!!

I am garteful ...

@Rouben Rostamian  

 

Sorry please!

How can I imposse these assumptions in Maple, against next time.

 

Thanks

@Rouben Rostamian  

 

 

Many thanks...

@Carl Love 

 

Thanks.

 

When I added the  codes

M := Matrix(n, m, datatype = float[8]); Statistics:-Sample(B1, M, method = [discrete, range = 0 .. n]); ExportMatrix(M, ...)

for Matrix size 20X50

it returns 

Vector(4, {(1) = ` 20 x 50 `*Matrix,

               (2) = `Data Type: `*float[8],

               (3) = `Storage: `*rectangular,

               (4) = `Order: `*Fortran_order})

 

And, when I clicked on it I got all zeros(Matrix 20X50); it appears like "place-holder"

Pls, how do I fill-in the generated data?

@Carl Love

 

This is interesting!

But, is it possible to read or link the results generated to another programe?

Suppose I want to link the data generated here(in Maple) to say STATA or R (Statistical Package)

 

 

@Rouben Rostamian  

 

Thanks sir.

 

But, I am not use to this type of "GAMMA(-a, -beta/lambda)"

how do I expand it pleaese?   

 

Also, when I tried it on MAPLE it uses an expression that I am not familiar with;

For example, when I evaluated this 

GAMMA(-3, 5) it returns  1/125 *Ei(4, 5)

What is Ei(4, 5) ?  

 

Thanks again...

@Markiyan Hirnyk 

 

Thanks so much, but, I wish to have it in simple form. 

@Carl Love 

Hello Prof, 

Long time! Hope research is going on well.

 

From Binomial random number generation "Scheme" below, suppose I want to repeat it number of times to generate different numbers of ths same sample size, how do I do that?

Thanks

 

restart:
B:= x-> binomial(n,x)*p^x*(1-p)^(n-x):
B1:= Statistics:-Distribution(
     Type= discrete, 
     ProbabilityFunction= B, 
     Support= 0..n, 
     DiscreteValueMap= (n-> n)
):
(n,p):= (23,1/3):
Statistics:-Sample(B1, 10, method= [discrete, range= 0..n]);

 

@vv

 

Many thanks.

Yes! I noticed that the moments can not be written in closed form.

But, can the first moment (mean) be written in approximate form?  

 

Again, I appreciate everyone.

@Axel Vogt 

 

No name yet.

@Markiyan Hirnyk 

By moments, I mean I want to find the mean, variance, skewness, kutosis...

@Markiyan Hirnyk 

 

Many thanks,

I feel so strongly that the moment will exist at some points. How to adjust it, is what I do not know now.

Please, look at the moments again if it is possible to get it in approximate form.

1 2 3 4 Page 3 of 4