Probability and statistics

  1. Maximum:max
    • x=[1,3,7,5] max(x) >>>7

  2. Minimum:min
    • x=[1,3,7,5] min(x) >>>1

  3. Sorting:sort
    • x=[1,3,7,5] sort(x) >>>=[1,3,5,7]

  4. Mean value:mean
    • x=[1,3,7,5] mean(x) >>>4.0

  5. Variance:var
    • x=[1,3,7,5] var(x) >>>5.0

  6. Standard variance:std
    • x=[1,3,7,5] std(x) >>>2.2360679775

  7. Probability of random variable:P{X}
  8. Expected value of random variable:E(X)
  9. Variance of random variable:D(X)
  10. Standard variance of random variable:σ(X)
  11. Probability density function of random variable:pdf
  12. Die with a sides number parameter:Die(X)
    • x=Die(6) >>>x=Die(6) P{x>=4} >>>0.5 E(x) >>>3.5 D(x) >>>2.91666666666667 σ(x) >>>1.70782512765993 pdf(x) >>>{ 1:16, 2:16, 3:16, 4:16, 5:16, 6:16 }

  13. Binomial distribution:b(n,p)

    The density of the Binomial distribution is given by:

    P{X=k}= n k pk (1-p)n-k k=0,1,2,...,n

    • x=b(4,0.5) >>>x=b(4,0.5) P{x>=4} >>>0.0625 E(x) >>>2 D(x) >>>1 σ(x) >>>1 pdf(x) >>>{ 0:0.0625, 1:0.25, 2:0.375, 3:0.25, 4:0.0625 }

  14. Poisson distribution:π(λ)

    The density of the Poisson distribution is given by:

    P{X=k}= λke k!

    • x=π(3) >>>x=π(3) E(x) >>>3 D(x) >>>3 σ(x) >>>1.73205080756888 pdf(x) >>> 3k e3*(k)!

  15. Uniform distribution:U(a,b)

    The density of the Uniform distribution is given by:

    f(x)= 1b-ax∈[a,b] 0otherwise

    • x=U(1,7) >>>x=U(1,7) P{x>3} >>>0.666666666666667 E(x) >>>4 D(x) >>>3 σ(x) >>>1.73205080756888 pdf(x) >>>16

  16. Exponential distribution:Expd(θ)

    The density of the Exponential distribution is given by:

    f(x)= 1θe-x/θx>0 0otherwise

    • x=Expd(10) >>>x=Expd(10) P{x>3} >>>9.35762296884017e-14 E(x) >>>0.1 D(x) >>>0.01 σ(x) >>>0.1 pdf(x) >>>10*e-10*x

  17. Normal distribution:N(μ,σ)

    The density of the Normal distribution is given by:

    f(x)=1σ2π e - (x-μ)2 2σ2

    • x=N(0,1) >>>x=N(0,1) P{x>3} >>>0.00134989803163009 E(x) >>>0 D(x) >>>1 σ(x) >>>1 pdf(x) >>> 22*π * e - x2 2

  18. Chi-squared distribution:χ2

    The density of the Chi-squared distribution is given by:

    f(x)= 12n/2Γ(n/2) xn/2-1e-x/2x>0 0otherwise

    • x=χ2(6) >>>x=χ2(6) P{x>3} >>>0.808846830538058 E(x) >>>6 D(x) >>>12 σ(x) >>>3.46410161513775 pdf(x) >>> x216 * e - x 2

  19. t distribution:t(n)

    The density of the t distribution is given by:

    f(x)= Γ((n+1)/2) πnΓ(n/2) (1+x2n) -(n+1)/2

    • x=t(6) >>>x=t(6) P{x>3} >>>0.0120040983778655 E(x) >>>0 D(x) >>>1.5 σ(x) >>>1.22474487139159

  20. F distribution:F(m,n)

    The density of the F distribution is given by:

    f(x)= Γ((m+n)/2)(m/n)m/2x(m/2)-1 Γ(m/2)Γ(n/2)(1+(mx/n))(m+n)/2 x>0 0otherwise

    • x=F(2,6) >>>x=F(2,6) P{x>3} >>>0.125 E(x) >>>1.5 D(x) >>>6.75 σ(x) >>>2.59807621135332