Donate

Donations will go to my Mathstepbystep.net Paypal Page. All donations will be used to help support this blog. Thank You!

Showing posts with label Standard Deviaion. Show all posts
Showing posts with label Standard Deviaion. Show all posts

Tuesday, October 28, 2014

Geometric Distributions



Below is my Google Docs Spreadsheet for Geometric Distributions:

This sheet you cannot change because I have it locked, but if you would like access so you can use my sheet, and just put in your data and get the answer - email me: messenger1964@yahoo.com

Geometric Distribution
xpAnswer
Formula 00.25
p(x) = p(1-p)^(x) =-->-->0.25
where p is the probability of success, 0<p<1 and x = {0,1,2.....}
Google Sheets Function
[=NEGBINOMDIST(x,1,p)]-->-->0.25
(more google sheets functions - see below)
Mean
E[X]=μ = (1-p)/p
μ =-->-->3
Variance
Var = σ^(2)
σ^(2) = (1-p)/p^(2)
σ^(2)=-->-->12
Standard Deviation
St.Dev = √σ-->-->3.46410161513775
Third Moment of X about the Mean =
E[(X-E[X])^(3)]=
(1-p)*(2-p)/p^(3)=-->-->84
4th Moment of X about the Mean =
E[(X-E[X])^(4)]=
(1-p)*(p^(2)-9p+9)/p^(4)=-->-->1308
Moment Generating Function
M(t) = E[e^(tX)] = p*(1/((1-e^(t))*(1-p))
p*(1/((1-e^(t))*(1-p))
Distribution Function
∀t < 0 ......F(t) = P{X≤t} =P{X∉R} = 0
∀t ≥ 0 ......F(t) = P{X≤[t]} = 1-(1-p)^([t]+1)
Google Sheets Function (All)
BINOMDIST(num_successes, num_trials, prob_success, cumulative)
P{X=x} [=NEGBINOMDIST(x,1,p)]
P{X≤x} [=NEGBINOMDIST(x,1,p)]
P{X<x} [=NEGBINOMDIST(x,1,p)]
P{X>x} [=1-NEGBINOMDIST(x,1,p)]
P{X≥x} [=1-NEGBINOMDIST(x-1,1,p)]
x<y
P{x<X<y} [=NEGBINOMDIST(y-1,1,p)-[=NEGBINOMDIST(x,1,p)]
P{x<X≤y} [=NEGBINOMDIST(y,1,p)-[=NEGBINOMDIST(x,1,p)]
P{x≤X<y} [=NEGBINOMDIST(y-1,1,p)-[=NEGBINOMDIST(x-1,1,p)]
P{x≤X≤y} [=NEGBINOMDIST(y,1,p)-[=NEGBINOMDIST(x-1,1,p)]
http://mathworld.wolfram.com/GeometricDistribution.html
http://www.math.uah.edu/stat/bernoulli/Geometric.html
http://en.wikipedia.org/wiki/Geometric_distribution#Moments_and_cumulants

Sunday, October 12, 2014

Hypergeometric Distributions


X ~Hyp(N,n,p) 

"This distribution describes the experiment where elements are picked at random without
replacement. More precisely, suppose that we have N elements out of which M has a certain
attribute (and N −M has not). If we pick n elements at random without replacement p(r)
is the probability that exactly r of the selected elements come from the group with the
attribute." (1)

(1)  Hand-book on STATISTICAL DISTRIBUTIONS for Experimentalists, by Christian Walck, Published by: Particle Physics Group Fysikum, University of Stockholm

QRSTUVWXYZAAABAC
1Hypergeometric Distribution
2adxnNNCndCxN-dCn-xAnswerROUND (4th)
3Formula1048602558620845210230300
4P(X=x) = {(dCx)*([N-d]C[n-x])}/(NCn) =0.0189019799844550.0189
5For x= (0, 1...min(n.d)),
6Google Sheets Formula = (=(Y3*Z3)/X3)(=ROUND(AA,4))
7
8bdynNNCndCxN-dCn-xAnswerROUND (4th)
915386025586208454551221759
100.2172656202994390.2173
11
12
13
14
15
16Google Sheets Function (Basic)
17[=HYPGEOMDIST(x,n,d,N)]0.0189019799844550.0189
18(=HYPGEOMDIST(U4,V4,T4,W4))
19Google Sheets Formula =
20Mean
21E[X]=μ = n*(d/N)
22μ =1.33333333333333
23Google Sheets Formula = (=V3*(T3/W3))
24
25Variance
26Var = σ^(2)=
27n*(d/N)*(1-(d/N)*((N-n)/(N-1))
28σ^(2)=1.137476459510361.1375
29Google Sheets Formula = (=Q3*(O3/R3)*(1-(O3/R3)*((R3-Q3)/(R3-1))))
30
31
32Standard Deviation
33St.Dev = √σ1.066525414376221.0665
34Google Sheets Formula = (=SQRT(V19))
35
36
37Moment Generating Function
38A moment generating function does exist for the hypergeometric distribution
39
40
41
42Third Moment of X about the Mean =
43E[(X-μ)^(3)]=
44n*(d/N)*(1-d/N)*(1-(2d/n))*((N-n)/(N-1))*((N-2n)/(N-2))=-1.11435807519969-1.1144
45Google Sheets Formula = (=R3*(P3/S3)*(1-(P3/S3))*(1-(2*P3/R3))*((S3-R3)/(S3-1))*((S3-2*R3)/(S3-2)))
46
47
48Google Sheets Function (All)
49HYPGEOMDIST(num_successes, num_draws, successes_in_pop, pop_size)
50P{X=x} [=HYPGEOMDIST(x,n,d,N)]0.018901979984455
51P{X≤x} [=HYPGEOMDIST(x,n,d,N)] Note: no cumulative in this function in Google Sheets.0.018901979984455
52P{X<x} [=HYPGEOMDIST(x-1,n,d,N)]0.099370409061136
53P{X>x} [=1-HYPGEOMDIST(x,n,d,N)]0.018901979984455
54P{X≥x} [=1-HYPGEOMDIST(x-1,n,d,N)]0.900629590938864
55
56x<y
57P{x<X<y} [=HYPGEOMDIST(y-1,n,d,N)] - [=HYPGEOMDIST(x,n,d,N)]0.31535282047622
58P{x<X≤y} [=HYPGEOMDIST(y,n,d,N)] - [=HYPGEOMDIST(x,n,d,N)]0.198363640314984
59P{x≤X<y} [=HYPGEOMDIST(y-1,n,d,N)] - [=HYPGEOMDIST(x-1,n,d,N)]0.234884391399539
60P{x≤X≤y} [=HYPGEOMDIST(y,n,d,N)] - [=HYPGEOMDIST(x-1,n,d,N)]0.117895211238303
61
62
63

LINK TO GOOGLE SPREADSHEET - CLICK HERE!