Teep

55 Reputation

0 Badges

10 years, 133 days

MaplePrimes Activity


These are questions asked by Teep

I wish to write a simple procedure to evaluate the Poisson quantile function, F, for many possible parameter values, lambda.

The Maple commands to evaluate F for individual lambda values works just fine, however, I have tried to write a simple procedure to evaluate F for prescribed lambda values (imported from Excel) but to no avail. I'm missing something quite basic, I'm sure.

Can anybody offer a suggestion please? Thanks.

 

Inverse_Poisson_Procedure.mw

 

Given any threshold value, I am interested in obtaining a quantity of interest using the inverse negative binomial distribution. This requires extracting the value from the discrete CDF and I am using the Quantile(X, threshold value) function.

The parameters of the NBD are given as r and p and the routine I have written (attached) works in some cases, but I have noticed that, for small values of p, the Maple program runs for excessive times to attempt to output the Quantile solution. For instance, if p = 0.3, the solution is fast but when p = 0.003, Maple continues to evaluate the solution with no result (I have interrupted computations after 2 hours).

In the attached example, p is set to 1.965 and r is 0.5. The threshold value is 0.98 and the associated solution, Q, for this value is determined to be Q=7.

Does anybody know how to help with this? I would be grateful for any help along the way. 


 

restart; with*Statistics; with(plots)

r := 1.965; p := .5

1.965

 

.5

(1)

with(Statistics)

R := RandomVariable(NegativeBinomial(r, p))

ProbabilityFunction(R, u)

Set the value of the CDF probability, α.

Evaluate the inverse CDF to return the quantity of interest, Q.

 

alpha := .98

.98

(2)

X := NegativeBinomialVariable(r, p); X := RandomVariable(NegativeBinomial(r, p))

CumulativeDistributionFunction(X, alpha)``

Q := Quantile(X, alpha)

7.

(3)

DensityPlot(X, title = "PDF")

 

plot(CDF(X, s), title = "CDF")

 

``

``NULL

``

``


 

 

I'm hoping somebody can help with this problem.

The Poisson Loss Function is defined by the series:

L := sum((n-s)*lambda^n*exp(-lambda)/factorial(n), n = s .. infinity)

Where lambda is the mean value that is prescribed and s is the variable in question.

Now, if the value of L is given, can anyone tell me how to solve for  s?

Poisson Distribution Loss Function Tables are available and give values for s for a given lambda, so I's like to see if Maple can handle this.

 

Thanks for reading!

I wish to extract a minimum route in a network given both start and end positions.

Also, I wish to avoid a spur in the circuit and obtain one continuous orthogonal  path. 

As an example, take the 7-node case having 14 arcs (see worksheet) using Dijkstra's algorithm (I assume this is fit for purpose in this particular case).

Starting with node 1, the algorithm suggests the paths:

1>2>3>4>5>6>7.>8>9 and 1>2>3>4>5>10>11>12>13>14 (here, there is a spur at node 5 where the paths separate)

Is it possible obtain one minimum path?

The source node is prescribed in the routine - can anyone explain how to prescribe the end node?

Thanks for reading!

Shortest_Circuit.mw

 

I have three columns of data (real numbers) in Excel that have about one thousand rows and I wish to plot their relationships in Maple. The source data simply comprises three columns of numbers and so, are not ordered in triples, [x,y,z]. Does anyone know of a simple routine available that allows me to import the raw data and output a 3-D wire / solid plot in Maple?

Thank you! 

1 2 3 4 Page 1 of 4