Last chance! 50% off unlimited learning
Sale ends in
Estimate
ehyper(x, m = NULL, total = NULL, k, method = "mle")
non-negative integer indicating the number of white balls out of a sample of
size k
drawn without replacement from the urn. Missing (NA
),
undefined (NaN
), and infinite (Inf
, -Inf
) values are not
allowed.
non-negative integer indicating the number of white balls in the urn.
You must supply m
or total
, but not both.
Missing values (NA
s) are not allowed.
positive integer indicating the total number of balls in the urn (i.e.,
m+n
). You must supply m
or total
, but not both.
Missing values (NA
s) are not allowed.
positive integer indicating the number of balls drawn without replacement from the
urn. Missing values (NA
s) are not allowed.
character string specifying the method of estimation. Possible values are
"mle"
(maximum likelihood; the default) and "mvue"
(minimum variance unbiased). The mvue method is only available when you
are estimating total
).
See the DETAILS section for more information on these estimation methods.
a list of class "estimate"
containing the estimated parameters and other information.
See
estimate.object
for details.
Missing (NA
), undefined (NaN
), and infinite (Inf
, -Inf
)
values are not allowed.
Let m=
n=
k=
Estimation
Estimating M, Given T and K are known
When floor
function.
That is,
If the quantity ehyper
uses for this case.
The minimum variance unbiased estimator (mvue) of
Estimating T, given M and K are known
When
Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.
Johnson, N. L., S. Kotz, and A. Kemp. (1992). Univariate Discrete Distributions. Second Edition. John Wiley and Sons, New York, Chapter 6.
# NOT RUN {
# Generate an observation from a hypergeometric distribution with
# parameters m=10, n=30, and k=5, then estimate the parameter m.
# Note: the call to set.seed simply allows you to reproduce this example.
# Also, the only parameter actually estimated is m; once m is estimated,
# n is computed by subtracting the estimated value of m (8 in this example)
# from the given of value of m+n (40 in this example). The parameters
# n and k are shown in the output in order to provide information on
# all of the parameters associated with the hypergeometric distribution.
set.seed(250)
dat <- rhyper(nn = 1, m = 10, n = 30, k = 5)
dat
#[1] 1
ehyper(dat, total = 40, k = 5)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Hypergeometric
#
#Estimated Parameter(s): m = 8
# n = 32
# k = 5
#
#Estimation Method: mle for 'm'
#
#Data: dat
#
#Sample Size: 1
#----------
# Use the same data as in the previous example, but estimate m+n instead.
# Note: The only parameter estimated is m+n. Once this is estimated,
# n is computed by subtracting the given value of m (10 in this case)
# from the estimated value of m+n (50 in this example).
ehyper(dat, m = 10, k = 5)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Hypergeometric
#
#Estimated Parameter(s): m = 10
# n = 40
# k = 5
#
#Estimation Method: mle for 'm+n'
#
#Data: dat
#
#Sample Size: 1
#----------
# Clean up
#---------
rm(dat)
# }
Run the code above in your browser using DataLab