Introduction

Old School RuneScape (OSRS) is a popular MMORPG in which players often hunt for rare items dropped by monsters upon death, according to probabilities ranging from 1/128 to 1/5,000 or rarer (e.g., 1/32,768 for a dragon chainbody from a dust devil). These mechanics lead to varied player experiences, such as “getting spooned” (obtaining a drop early) or “going dry” (many kills without success). This project, developed in March 2025, uses R to simulate drop mechanics over 10,000 trials, providing statistical insights into three phenomena:

Motivated by my passion for OSRS and statistical modelling, this project quantifies these experiences using probability distributions and hypothesis testing. It also explores outliers, where significantly more kills are needed (e.g., ~3× the drop rate), which resonate with posts on community platforms like the 2007scape subreddit about extreme misfortune. Beyond gaming, the methodology applies to rare event modelling in fields like manufacturing or finance. This report details the simulation, results, and insights, showcasing my skills in R programming, statistical analysis, and data visualisation for my data analysis portfolio.

Methodology

The OSRS Drop Rate Simulator models drop mechanics for rates from 1/8 to 1/5,000 using probability distributions, statistical tests, and ggplot2 visualisations. The simulation runs 10,000 trials to ensure robust results, with parameters tailored for each analysis:

The script (osrs_drop_rate_simulator.R) defines a simulate_drops function for binomial simulations and computes statistics with compute_stats. Visualisations include CDF plots (log10 scale), streak histograms, and inter-drop time distributions, saved to figures/. Below is the core simulation function:

simulate_drops <- function(n_trials, n_kills, probs) {
  # Simulate binomial drops for given trials, kills, and probabilities
  # Args:
  #   n_trials: Number of trials
  #   n_kills: Number of kills per trial
  #   probs: Vector of success probabilities
  # Returns: 3D array of drops (trials x kills x probabilities)
  return(array(rbinom(n_trials * n_kills * length(probs),
                      size = 1,
                      prob = rep(probs, each = n_trials * n_kills)),
               dim = c(n_trials, n_kills, length(probs))))
}

The simulation uses set.seed(123) for reproducibility and adjusts parameters (e.g., 10,000 trials for first drop/streaks, 1,000 kills for streaks, 5,000 kills for clustering) to balance computational feasibility and statistical reliability. All analyses are implemented in R with ggplot2 for visualisations and knitr for report generation.

Results

The simulation produces three tables and three plots, quantifying kills to first drop, lucky streaks, and drop clustering. Results align closely with theoretical expectations, validating the simulation’s accuracy. Below, we present the key outputs with interpretations, focusing on player-relevant insights like the outlier experience.

Statistical Summary

The df_stats table compares simulated and theoretical metrics for kills to first drop across drop rates (1/8 to 1/5,000). Key metrics include means, variances, IQRs, outlier thresholds, and outlier counts, with outliers defined as kills exceeding \(Q_3 + 1.5 \times \text{IQR}\).

Simulated vs. Theoretical Metrics for Kills to First Drop
prob simulated_mean theoretical_mean simulated_variance theoretical_variance simulated_IQR theoretical_IQR simulated_outlier_threshold theoretical_outlier_threshold simulated_outliers theoretical_outliers
1/8 7.92 8 55.11 56 8.00 8 23 22 461 464
1/16 15.88 16 225.87 240 17.00 17 48 46 449 482
1/32 31.71 32 1003.13 992 34.00 34 94 94 516 490
1/64 64.67 64 4185.47 4032 69.00 70 192 193 514 471
1/128 128.43 128 16412.24 16256 140.00 140 387 386 490 481
1/256 259.17 256 67429.17 65280 281.00 281 778 776 484 480
1/512 507.76 512 253933.88 261632 562.00 562 1548 1552 462 480
1/1048 1066.27 1048 1133834.23 1097256 1188.25 1151 3270 3178 444 481
1/3000 3009.21 3000 8907136.21 8997000 3293.00 3296 9096 9102 505 481
1/5000 5033.09 5000 26272268.46 24995000 5517.50 5492 15216 15168 483 481

Simulated means (e.g., 7.92 for 1/8) and outlier counts (e.g., 461 for 1/8) closely match theoretical values (mean = 8, outliers = 464), confirming the geometric distribution’s fit. Outlier thresholds (e.g., ~387 for 1/128) quantify “going dry,” with ~1/20 players (5%) expected to exceed these thresholds per drop, a stable probability across rates.

Lucky Streaks

The df_streak_probs table shows the probability of 2+ drops in a 100-kill window, comparing empirical and theoretical (Poisson-based) values. This quantifies “lucky streaks” celebrated in the OSRS community.

Probability of 2+ Drops in a 100-Kill Window
prob empirical_prob_2plus theoretical_prob_2plus
1/8 1.0000 0.9999
1/16 0.9879 0.9860
1/32 0.8216 0.8188
1/64 0.4575 0.4629
1/128 0.1878 0.1845
1/256 0.0624 0.0591
1/512 0.0153 0.0168
1/1048 0.0034 0.0043
1/3000 0.0005 0.0005
1/5000 0.0001 0.0002

Empirical probabilities (e.g., 18.78% for 1/128) align with theoretical values (18.45%), validating the simulation. For rare drops (e.g., 1/5000), the probability is low (0.01%), reflecting the rarity of streaks.

Drop Clustering

The df_clustering table assesses whether drops cluster or are random, using KS test p-values (inter-drop times vs. exponential distribution) and dispersion indices (variance/mean of drop counts).

Clustering Analysis Results
prob ks_pvalue dispersion_index
1/8 < 0.01 0.93
1/16 < 0.01 0.85
1/32 < 0.01 0.95
1/64 < 0.01 0.97
1/128 < 0.01 1.03
1/256 < 0.01 1.10
1/512 < 0.01 1.02
1/1048 < 0.01 0.90
1/3000 < 0.01 0.98
1/5000 < 0.01 1.00

Dispersion indices (~1, e.g., 1.03 for 1/128) support that inter-drop times approximately follow an exponential distribution, indicating random drops with no clustering. The Kolmogorov-Smirnov (KS) test yields small p-values (< 0.01), likely due to the large sample size (10,000 trials) amplifying minor deviations, but these do not indicate practically significant clustering. Jitter (0-1) was applied to break ties in discrete data for the KS test, with warnings suppressed as they do not affect conclusions.

Visualisations

Three plots visualise the results, saved to figures/:

  • CDF Plot: Empirical vs. theoretical cumulative distribution of kills to first drop (log10 scale).
  • Lucky Streaks: Histogram of drops in a 100-kill window, with a threshold at 2 drops.
  • Inter-Drop Times: Faceted histograms of inter-drop times vs. theoretical exponential distribution.

Discussion

This project quantifies OSRS drop mechanics, offering insights for players and demonstrating statistical modelling skills. Key findings include:

The outlier analysis is particularly relevant. Using the 1.5 × IQR rule, “going dry” occurs at ~3× the drop rate (e.g., ~387 for 1/128, ~15,000 for 1/5,000), with a ~1/20 chance per drop. For very rare drops (e.g., 1/32,768 for the dragon chainbody from a dust devil), “lucky” outliers (early drops) are possible, though not applicable to the rates studied here, as the lower quartile minus 1.5 × IQR is negative. This framework helps players understand when their luck is truly anomalous, addressing questions like “How unlucky is 3× the drop rate?”

Beyond OSRS, the methodology applies to rare event modelling in finance (e.g., extreme market events) or manufacturing (e.g., defect clustering). Limitations include the 1.5 × IQR rule’s arbitrariness (players may perceive “bad luck” at 2× or 4× the drop rate), the focus on single-drop mechanics, excluding complex OSRS systems (e.g., drop tables with multiple items), and the reliance of the clustering analysis on simulated random data, which assumes independent, identically distributed drops; real OSRS data would be needed to confirm this in the game itself. Additionally, the KS test’s small p-values (< 0.01) for inter-drop times are influenced by large sample sizes (10,000 trials) and the approximation of discrete geometric data as continuous exponential, potentially over-detecting minor deviations from randomness.

This project strengthens my portfolio, showcasing R programming (ggplot2, statistical functions), probability expertise, and the ability to connect technical analysis to community interests, aligning with my goal to become a Data Scientist or Statistician.