Reading the calculation
The geometric distribution requires k−1 failures followed by one success, giving (1−p)ᵏ⁻¹p under this trial-counting convention.
This definition sets the boundary between geometric distribution and a neighboring calculation with similar inputs.