[R] hypergeometric & population estimates

Remington, Richard rnews at kernstat.com
Wed Oct 1 23:05:47 CEST 2003


# another vote for 107

n <- 1:500
x <- 8
m <- 11
totaldrawn <- 78
MLE <- floor(m * totaldrawn / x)
likelihood <- choose(m,x)*choose(n-m,totaldrawn-x)/choose(n,totaldrawn)
plot(n, likelihood)
abline(v=MLE)

RBaskin at ahrq.gov wrote:

> I'm not sure I understand your notation:
> (1) We recently conducted an aerial survey and saw 70 uncollared caribou and
> 8 of 11 collared caribou.
> (2) k <- 70        #  number caribou seen (# balls drawn)
> 
> It's the number of balls drawn parenthetical remark that bothers me - I
> think the total number of balls drawn should be 78 and the number of
> non-white balls drawn is 70.
> 
> If
> x <- 8         # number resighted caribou (white balls drawn)
> m <-11         # number collared caribou (white balls total)
> totaldrawn <- 78        #  number caribou seen (total # balls drawn)
> 
> I believe that the maximum likelihood estimator you are looking for is given
> by
> 
> MLE <- floor(m * totaldrawn / x)  #floor(11 * 78 / 8) = 107
> 
> I believe the trick is to look at f(n) = P(x|m,totaldrawn,n) as a function
> of n and consider the ratio f(n) / f(n-1).  If this ratio is greater than 1
> the function is increasing and if the ratio is less than 1 the function is
> decreasing.  Then algebraically show that the maximum occurs at floor(m *
> totaldrawn / x).
> 
> Bytheway, this MLE includes both collared and uncollared balls so it may be
> that you are looking for 107 - 11 as your estimate??
> 
> hth
> Bob
> Usual disclaimers...
> 
> -----Original Message-----
> From: Jesse.Whittington at pc.gc.ca [mailto:Jesse.Whittington at pc.gc.ca] 
> Sent: Wednesday, October 01, 2003 12:56 PM
> To: R-help at stat.math.ethz.ch
> Subject: [R] hypergeometric & population estimates
> 
> "help"
> 
> We want to estimate the number of caribou in Jasper.  We recently conducted
> an aerial survey and saw 70 uncollared caribou and 8 of 11 collared
> caribou.  We want to estimate the number of caribou in this population with
> 95% confidence limits.  Gary White uses the hypergeometric distribution and
> determines the population estimates using maximum likelihood and 95%CL as
> -2LogLikelihoods.  Below, I determined the population estimate using
> dhyper(x,m,n,k) and maximizing the density value as a function of n, but do
> not know how I should calculate MLE with this distribution.
> 
> 
> x <- 8         # number resighted caribou (white balls drawn)
> m <-11         # number collared caribou (white balls total)
> k <- 70        #  number caribou seen (# balls drawn)
> n <- 1:500     #  ?? unknown number of uncollared caribou (# black balls)
> d <- unlist(lapply(n, function(i) dhyper(x,m,i,k)))     # density estimate
> for each value of n
> data <- data.frame(estimate = n+m, d)
> data <- data[is.finite(data$d), ]             # filter out NA's
> 
> max.d <- max(data$d)
> pop.estimate <- data[data$d == max.d, 1]
> 
> Thank-you for your assistance,
> Jesse
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 

Richard E. Remington III
Statistician
KERN Statistical Services, Inc.
PO Box 1046
Boise, ID 83701
Tel: 208.426.0113
KernStat.com




More information about the R-help mailing list