Given the cumulative distribution function (CDF):
\[ F(x) = \frac{1}{1 + (x/\alpha)^{-\beta}}, \qquad x > 0, \]
where \(\alpha > 0\) and \(\beta > 0\).
\[ u(x) = 1 + (x/\alpha)^{-\beta}. \]
Then
\[ F(x) = u(x)^{-1}. \]
The density is
\[ f(x) = \frac{d}{dx}F(x). \]
Using the chain rule,
\[ \frac{d}{dx} u(x)^{-1} = -u(x)^{-2} \cdot u'(x). \]
Now compute \(u'(x)\):
\[ u(x) = 1 + (x/\alpha)^{-\beta}. \]
\[ \frac{d}{dx}(x/\alpha)^{-\beta} = -\beta (x/\alpha)^{-\beta - 1} \cdot \frac{1}{\alpha}. \]
Thus,
\[ u'(x) = -\frac{\beta}{\alpha}(x/\alpha)^{-\beta - 1}. \]
\[ \begin{aligned} f(x) &= -u(x)^{-2} \cdot u'(x) \\ &= -\left[1 + (x/\alpha)^{-\beta}\right]^{-2} \left(-\frac{\beta}{\alpha}(x/\alpha)^{-\beta - 1}\right). \end{aligned} \]
The negative signs cancel:
\[ f(x) = \frac{\beta}{\alpha} (x/\alpha)^{-\beta - 1} \left[1 + (x/\alpha)^{-\beta}\right]^{-2}. \]
Multiplying numerator and denominator by \((x/\alpha)^{2\beta}\) gives
\[ f(x) = \frac{(\beta/\alpha)(x/\alpha)^{\beta - 1}} {\left[1 + (x/\alpha)^{\beta}\right]^2}, \qquad x > 0. \]
# Step 1: Enter the recovery data
x <- c(8.23, 12.74, 14.83, 16.61, 18.16, 19.55, 20.80, 21.94,
23.00, 23.98, 24.89, 25.75, 26.56, 27.34, 28.08, 28.79,
29.48, 30.15, 30.81, 31.45, 32.08, 32.70, 33.31, 33.92,
34.53, 35.13, 35.73, 36.33, 36.93, 37.53, 38.14, 38.75,
39.37, 40.00, 40.64, 41.29, 41.95, 42.63, 43.33, 44.05,
44.79, 45.56, 46.36, 47.20, 48.08, 49.02, 50.03, 51.12,
52.32, 53.65)
# Sample size
n <- length(x)
# Step 2: Compute first two sample moments
# First moment (sample mean)
m1 <- mean(x)
# Second moment (mean of squared values)
m2 <- mean(x^2)
# Step 3: Define function to solve for beta numerically
moment_equation <- function(beta) {
# Sample ratio
lhs <- m2 / (m1^2)
# Theoretical ratio (from population moments)
rhs <- beta(1 + 2/beta, 1 - 2/beta) /
(beta(1 + 1/beta, 1 - 1/beta)^2)
return(rhs - lhs)
}
# Solve for beta_hat
beta_hat <- uniroot(moment_equation, interval = c(2.1, 50))$root
beta_hat[1] 6.006232
[1] 32.6543
set.seed(123)
B <- 5000 # number of bootstrap samples
alpha_boot <- numeric(B)
beta_boot <- numeric(B)
for (b in 1:B) {
# Resample with replacement
x_star <- sample(x, size = n, replace = TRUE)
# Compute bootstrap moments
m1_star <- mean(x_star)
m2_star <- mean(x_star^2)
# Define moment equation for bootstrap sample
moment_star <- function(beta) {
lhs <- m2_star / (m1_star^2)
rhs <- beta(1 + 2/beta, 1 - 2/beta) /
(beta(1 + 1/beta, 1 - 1/beta)^2)
return(rhs - lhs)
}
# Solve numerically
beta_star <- tryCatch(
uniroot(moment_star, interval = c(2.1, 50))$root,
error = function(e) NA
)
if (!is.na(beta_star)) {
beta_boot[b] <- beta_star
alpha_boot[b] <- m1_star /
beta(1 + 1/beta_star, 1 - 1/beta_star)
}
}
# Remove failed cases
alpha_boot <- na.omit(alpha_boot)
beta_boot <- na.omit(beta_boot)
# Histogram of alpha_hat
hist(alpha_boot,
probability = TRUE,
main = "Bootstrap Distribution of alpha_hat",
xlab = "alpha_hat")
lines(density(alpha_boot), lwd = 2)# Histogram of beta_hat
hist(beta_boot,
probability = TRUE,
main = "Bootstrap Distribution of beta_hat",
xlab = "beta_hat")
lines(density(beta_boot), lwd = 2)The bootstrap sampling distribution of the Method of Moments estimator alpha-hat is unimodal and approximately symmetric. The histogram exhibits a clear bell-shaped pattern, and the overlaid kernel density curve closely resembles a normal distribution. The distribution appears centered around approximately 32–33 days, indicating stability in the scale estimate across bootstrap samples.
There is no substantial skewness or evidence of extreme outliers. The spread of the distribution suggests moderate sampling variability, but the estimator remains well concentrated around its central value.
Overall, the bootstrap results indicate that the Method of Moments estimator for the scale parameter alpha is stable and approximately normally distributed for this dataset.
The bootstrap sampling distribution of the Method of Moments estimator beta-hat is also unimodal but displays mild right skewness. While the distribution has a clear central peak around approximately 5.8–6.2, the right tail extends slightly further than the left, indicating some asymmetry.
Compared to alpha-hat, the distribution of beta-hat shows greater variability and less symmetry. This behavior is consistent with the fact that the shape parameter is estimated through a nonlinear moment equation, which can introduce additional sampling variability.
In summary, the bootstrap distribution suggests that the estimator beta-hat is reasonably stable but exhibits slight right skewness, reflecting greater sensitivity to sampling variation.