Stage 1 calculates class sampling probability by raising the freshness of each Rank Factor Class to an exponent before drawing a categorical sample:
\[ P(C_k) = \frac{\left(\frac{1}{1 + \sum_{i \in C_k} n_i}\right)^w}{\sum_j \left(\frac{1}{1 + \sum_{m \in C_j} n_m}\right)^w} \]
flowchart LR
A[Count Tests per Class] --> B["Calculate Freshness: 1 / (1 + tests)^w"]
B --> C[Compute Normalized Probabilities]
C --> D[Sample Winning Class C_k]
D --> E[Stage 2: Bayesian Selection in C_k]