Lilith

5 Reputation

One Badge

2 years, 292 days

MaplePrimes Activity


These are replies submitted by Lilith

@tomleslie 

Thank you, it's work! :) 

@Carl Love 

I try to do it, but I get errors:

Error, (in Statistics:-Distribution) expected one parameter, received: [[0, 1, 2, 3, 4, 5], probabilities = [1/2, 1/4, 1/8, 1/16, 1/32, 1/32]]
Error, (in Statistics:-Sample) invalid input: expected distribution or algebraic expression with random variables, but received X
Error, invalid input: Statistics:-Histogram expects its 1st argument, x, to be of type {array, list, rtable}, but received S
 

Do you know reason of it?

X:=RandomVariable(ProbabilityTable(prx)):

A:=Sample(X,1000):
Q:=Histogram(A,binwidth=1,range=0..10):
P:=plot(ProbabilityFunction(X,h+1), h=0..10,color=red):
plots[display](P,Q);

 


 

Page 1 of 1