# Talk:Angler's outfit

RESOLVED: (Original plot is correct)

Can someone provide the source code (or analytic solution) for the plot? I don't think it's correct.

I would expect the mean number of plays to be 32 since you could model the total outfit's PDF as the convolution of four geometric distributions with p=1/8.

In words, if the expected number of plays for each piece is 8, shouldn't the expected number of plays for four pieces be 32?

70.121.80.57 18:03, September 16, 2017 (UTC)

^OP here:

Following the idea I posted above, I came to the same result as the published plot. Here's my source code in Python (requires numpy and matplotlib):

import numpy as np # For convolution

import matplotlib.pyplot as plt # For plotting

p = 1.0/8 # Probability = 1/8

pdf = [0] + [(1-p)**(i-1)*p for i in range(1,100)] # Geometric PDF to get one piece

pdf_tot = np.convolve(pdf, np.convolve(pdf, np.convolve(pdf, pdf))) # Combined PDF for four pieces (convolution)

cdf_tot = [sum(pdf_tot[:i]) for i in range(1,100)] # Sum total PDF to calculate total CDF

plt.plot(100*np.array(cdf_tot)) # Plot output as percentage

plt.ylabel('Probability of obtaining complete angler outfit')

plt.xlabel('Number of trips')

plt.grid(b=True, which='both'); plt.show() # Show plot with gridlines

Conclusion: Even though the expected/mean number of trips to get one piece of the Angler's outfit is 8, the probability of getting a piece in 8 or fewer trips is nearly 66% (not 50% like I expected).

70.121.80.57 19:43, September 16, 2017 (UTC)