Chapter 7

Exercise 12:

An insurance company assumes that the time between claims from each of its homeowners’ policies is exponentially distributed with mean μ. It would like to estimate μ by averaging the times for a number of policies, but this is not very practical since the time between claims is about 30 years. At Galambos’ suggestion the company puts its customers in groups of 50 and observes the time of the first claim within each group. Show that this provides a practical way to estimate the value of μ.

# Define the mean time between claims
mu <- 30  # This is given, it's about 30 years between claims

# We'll simulate for a certain number of groups
number_of_groups <- 100  # Let's say we want to simulate 100 groups

# Each group has 50 policies
policies_per_group <- 50

# Initialize a vector to store the first claim time for each group
first_claim_times <- numeric(number_of_groups)  # This creates a vector of zeros

# Loop through each group to simulate the first claim time
for (group in 1:number_of_groups) {
  # Initialize a high value for comparison
  min_time = Inf  # Start with infinity, because any real time will be less than this
  
  # Now loop through each policy in the group to simulate the time until the first claim
  for (policy in 1:policies_per_group) {
    # Simulate the time for this policy's claim
    time = rexp(1, 1/mu)  # rexp(n, rate) generates 'n' random exponential values with 'rate' (1/mu here)
    
    # Check if this time is the minimum so far in the group
    if (time < min_time) {
      min_time = time  # Update the minimum time if this time is smaller
    }
  }
  
  # Store the minimum time for this group
  first_claim_times[group] = min_time
}

# Now we have the first claim times for all groups, we can estimate mu
# Since the first claim time for a group is on average mu/50, we multiply by 50 to estimate mu
estimated_mu = mean(first_claim_times) * 50

# Print out the estimated value of mu
print(paste("Estimated value of mu:", estimated_mu))
## [1] "Estimated value of mu: 30.4781544207183"

In conclusion, the simulation confirms that the strategy of grouping policies and observing the first claim time within each group is a practical and efficient way to estimate the average time between claims, \(\mu\), for homeowners’ insurance policies.