MuriloLobo

10 Reputation

One Badge

11 years, 87 days

MaplePrimes Activity


These are replies submitted by MuriloLobo

@Carl Love It's not only trim off the values over the 95% bounds, because I want to generate a specific quantity of aleatory values. Example: If I generate 100 values and 5 are over the 95% limit, it's not simply trim off the values, because in this case I would have only 95 values, and I want 100 values. And probably trimming off these samples I would change the mean and standard deviation of my set of values.

It's not necessary to trim on bottom end.

 

Is there any function that can solve my problem?

 

Thank you

Guys, I assume that my both questions were not well explained. I'm sorry.

 

Let me explain with an example:

 

I want to generate random numbers, with mean=20, SD=3, and respecting the max. probability(percentile) = 0.95.

For a normal distribution, with mean=20, SD=3, 95% of the values of this generation are under 24.93456. 

 

So: I want to generate X random numbers with mean=20, SD=3, and all the values must be under 24.93456. But the mean of the generated values must still be equal to 20. 

Is this enough explained now?

Thank you for your help and attention.

@Mac Dude And what about when you consider a cumulative distribution, and not the density? 

@Markiyan Hirnyk Hello, I'm sorry.

 

This concept of percentile: http://en.wikipedia.org/wiki/Percentile

Is there a function to generate random numbers with these 3 "inputs"?

@Carl Love Thank you very much for your help. I'm uploading it right now.

ZHU_CENTRALIZED.mw

 

Again, this is a "ready" code that I am trying to edit and apply to my database. I am not the author of this code. I agree with you that this variable S1 is not defined anywhere. When I change the last comma to a semicolon, the message error is different, as you imagine:

"Error, `S1` does not evaluate to a module

Error, bad index into Array

Error, bad index into Array"

 

So that's the point?

Hello guys,

 

I'm sorry for posting only this command line. I thought that the problem was kinda simple, so the beggining of the worksheet would not be important. This is the beggining of a Data Envelopment Analysis code. Here it goes the entire worksheet until this point:

 

restart; with(Optimization); with(Statistics)

n := 5139; m := 14; de := 10; s := 25; interface(warnlevel = 0); Nu := Matrix(1 .. n, 1 .. 2*de); U := Matrix(1 .. n, 1 .. s); V := Matrix(1 .. n, 1 .. m); VNUM := Matrix(1 .. n, 1 .. 3); w1 := Array(1 .. n); w2 := Array(1 .. n); wb := Array(1 .. n)

with(ArrayTools); t := ImportData(); x := ImportData(); y := ImportData(); z := ImportData() #AT THIS POINT I'M IMPORTING SOME VALUES FROM EXCEL

theta[0] := Array(1 .. n); theta[1] := Array(1 .. n); theta[2] := Array(1 .. n); theta1[0] := Array(1 .. n)

theta[b] := Array(1 .. n)

S1:-Results(solutionpoint);for cont2 from 1 to 2 do VNUM[jj,cont2]:=(rhs(S1:-Results(solutionpoint)[de+s+m+cont2]))end do;seq(-add(v[k]*x[jj,k],k=1..de)+add(u[r]*y[jj,r],r=1..s)<=0,j=1..n);seq(add(u[r]*y[jj,r],r=1..s)-add(v[k]*x[jj,k],k=1..de)<=0,j=1..n),

Error, invalid sequence
Typesetting:-mambiguous(S1colon;&minusResultsApplyFunction

(solutionpoint)semifor cont2 from 1 to 2 do VNUM(jjcommacont2)

Assign(rhsApplyFunction(S1colon;&minusResultsApplyFunction

(solutionpoint)(de + s + m + cont2)))end dosemiseqApplyFunction

(uminus0addApplyFunction(v(k)sdotx(jjcommak)commakequals1

period;&periodde) + addApplyFunction(u(r)sdoty(jjcommar)commar

equals1period;&periods)le0commajequals1period;&periodn)semi

Typesetting:-mambiguous(seqApplyFunction(addApplyFunction(u(r)

sdoty(jjcommar)commarequals1period;&periods)uminus0add

ApplyFunction(v(k)sdotx(jjcommak)commakequals1period;&periodde)

le0commajequals1period;&periodn)comma,

Typesetting:-merror("invalid sequence")))

 

 

Page 1 of 1