ivanciric / gtp-estimator
German Tank Problem Estimator
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ivanciric/gtp-estimator
This package is auto-updated.
Last update: 2025-10-17 13:00:17 UTC
README
German Tank Problem estimator in PHP
Installation
In composer.json file add the following in the require array:
"ivanciric/gtp-estimator": "0.0.*"
Usage
See example.php file.
Suppose k = 4 tanks with serial numbers 19, 40, 42 and 60 are captured. The maximal observed serial number, m = 60. The unknown total number of tanks is called N.
The formula for estimating the total number of tanks suggested by the frequentist approach outlined below is
N ≈ m + m/k − 1 = 74
Using GtpEstimator:
$estimate = Ivanciric\GtpEstimator\GtpEstimator::estimate(4, 60);
Wikipedia: https://en.wikipedia.org/wiki/German_tank_problem