# Items tagged with statisticsstatistics Tagged Items Feed

### Expected Value of a function...

January 08 2015
0 2

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.

### Why doesn't the integral evaluate?...

November 29 2014
0 4

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?

### Histogram defaults...

September 20 2014
2 1

Statistics:-Histogram by default choses the vertical axis such that the area under the histogram is 1 (or something like that). In my work, I invariably need to add "frequencyscale=absolute" to get the scale I need. Is there any way to make this the default? Typing this every time gets so old... I have been looking to something analogous to plots:-setoptions but that doesn't seem to exist for Statistics.

M.D.

### How do I calculate run of symbols in a binary word...

September 16 2014
2 3

How do I calculate run of 0s or run of 1s using maple?

### Generalized Least Squares...

August 30 2014
1 4

Hi Everyone

Is there a built-in way to fit a regression using generalized least squares in Maple ?

### How to compile statistics each number in a sequenc...

August 23 2014
1 16

RandomCompositions:= proc(n::posint, k::posint)
local
C,
Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))],
Rand:= rand(1..nops(Compositions))
;
()-> Compositions[Rand()]
end proc:

R:= RandomCompositions(9,6):
n:= 2^13:
S:= 'R()' $n: I want to compile statistics each number in a sequence cannot occur over twice. The sequences that do not fit the rule above must be ommitted. The statistic is Fermi-Dirac statistics. confused the Bose-Einstein condensation and Fermi-Dirac statistics. But the theory is right. ### How to animate the DensityPlot of a RandomVariable... August 23 2014 2 7 Hi, I don't manage to animate a DensityPlot. Here is my program : > restart; > with(Statistics): with(plots): > P := lambda->RandomVariable(Poisson(lambda)): > animate(DensityPlot,[P(n),range=0..10],n=1..5,frames=5); And here is the error message : Plotting error, non-numeric vertex definition Thanks for any help ### How to count the same random sequence as one... August 21 2014 0 6 RandomCompositions:= proc(n::posint, k::posint) local C, Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))], Rand:= rand(1..nops(Compositions)) ; ()-> Compositions[Rand()] end proc: R:= RandomCompositions(9,6): n:= 10: S:= 'R()'$ n;

S := [4, 1, 1, 1, 2, 0], [3, 2, 1, 1, 0, 2], [0, 1, 1, 0, 0, 7], [0, 1, 1, 5, 0, 2], [1, 0, 3, 1, 3, 1],

[1, 3, 1, 1, 0, 3], [1, 4, 2, 0, 2, 0], [5, 0, 0, 3, 1, 0], [1, 1, 1, 4, 0, 2], [0, 1, 2, 1, 0, 5]

[4, 1, 1, 1, 2, 0] , [1, 1, 1, 4, 0, 2]  and [0, 1, 1, 5, 0, 2] , [0, 1, 2, 1, 0, 5]  are same number

but different order.

There are two same sequence. I want to  count  as one, and compile statistics the summation, and

divide by 8.

the result

0=14/8

1=17/8

2=6/8

...

4=2/8

5=2/8

...

### how to plot the random statistics ...

August 20 2014
1 5

RandomCompositions:= module()
local
Compositions, Rand,
ModuleApply:= proc(n::posint, k::posint)
local C;
Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))];
Rand:= rand(1..nops(Compositions));
()-> Compositions[Rand()]
end proc
;
end module:
R:= RandomCompositions(8,6):
n:= 3:
S:= 'R()' \$ n;
map(lhs=rhs/n, Statistics:-Tally(op~([S])));

[0 = 7/3, 1 = 5/3, 2 = 4/3, 5 = 1/3, 6 = 1/3]

plot([S],x=0..8,style=point);

I have  plot problem .

I want to plot the statistics result,but it runs error.

### how to count the number summation ...

August 15 2014
1 10

RandomCompositions:= module()
local
Compositions, Rand,

RandomCompositions:= module()
local
Compositions, Rand,
ModuleApply:= proc(n::posint, k::posint)
local C;
Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))];
Rand:= rand(1..nops(Compositions));
()-> Compositions[Rand()]
end proc;

end module:
R:= RandomCompositions(8,6):
seq(R(),i=1..10);

[0, 0, 2, 6, 0, 0], [1, 0, 0, 3, 4, 0], [0, 3, 3, 2, 0, 0],[1, 2, 4, 0, 1, 0], [0, 4, 0, 1, 3, 0],

[2, 0, 1, 4, 1, 0],[2, 0, 1, 1, 3, 1], [1, 0, 4, 2, 1, 0], [1, 3, 0, 2, 0, 2],[2, 0, 3, 2, 1, 0]

with(Statistics):
Tally(R());
[0 = 1, 1 = 4, 4 = 1]

I want to count the 0 to 8 respectively summation,and divide by i.

But the  seq command  R() isn't conform  with Tally command R() .

Thanks.

### Strange ordinate axis in Histogram...

August 12 2014
0 3

Hej,

when using Statistics:-Histogram i received the following strange result for the ordinate:

restart;
Statistics:-Histogram([0.587944711e-1, 0.587944836e-1, 0.589720582e-1]);

### I am try to plot an interpolated plot of 3d data...

July 10 2014
1 3

Suppose i have an mx3 matrix M containing a 3D data where 1,2,3 columns are x,y,z coordinates.

Here is what i tried,

Statistics:-SurfacePlot(M[..,1],M[..,2],M[..,3]) does not produce what i want.

plots:-surfdata(M) plots what i want but only works when i use subset of the data for all the data it just hangs.

Statistics:-ScatterPlot3D(M, lowess, fitorder = 2) produces a smoothened version but i want the interpolated plot.

### Stem and Leaf Plot...

July 04 2014 Maple
1
0

Following @acer 's challenge to create some more examples for the Rosetta Code project, I've put together some code that constructs Stem-And-Leaf plots here.

I've also attached a new mathapp ( StemAndLeafDisplay.mw ) that contains the code as well as an interactive example for Stem-Plots. This MathApp is also viewable online at the following mobius project page.

This older post may also be of interest for anyone looking to make a stem and leaf plot with decimals.

### how to plot tail of normal distribution?...

June 27 2014
0 1

how to plot tail of normal distribution

would like to see the shape of tail of distribution

### Problem with ExponentialFit - residualsumofsquares...

June 04 2014
1 8

> with(Statistics);
> X := Vector([1, 2, 3, 4, 5, 6, 7], datatype = float);
> Y := Vector([155625, 172472, 179589, 186579, 205421, 214989, 237937], datatype = float);
> ExponentialFit(X, Y, x, output = residualsumofsquares);

Result by Maple: 0.00216641200893470318
But a real result is 8.159611742*10^7

Please, can anybody help me? Thank you.

 1 2 3 4 5 6 7 Last Page 1 of 9
﻿