We analyze the security of a server system over a period of n weeks. Each week, the system receives a security update, but it is also targeted by m independent attackers, each with a probability p of successfully compromising it in any given week.
We represent this as a stochastic process where the system’s security “score” changes weekly:
- It increases by +1 for each week it remains secure.
- It decreases by -1 for each week it suffers one or more successful breaches.
The progression of this score over time can be modeled as a random walk, whose direction is influenced by the system’s vulnerability and the number of attackers.

The plot provides a visual representation of our security framework, which we have modeled as a stochastic process, specifically a biased random walk.
Description of the Graphical Components
- Horizontal Axis (X): Represents the timeline, measured in weeks, from the start (0) up to 100 weeks.
- Vertical Axis (Y): Shows the aggregated security performance score, which begins at zero.
- Individual Traces (Lines): Each distinct line charts a single potential timeline of the server’s security score throughout the period.
- Color Coding: The lines are grouped by color to represent different threat environments, specifically varying numbers of simultaneous attackers
m(m=1: blue, m=3: orange, m=10: red)
The Stochastic Process Mechanism and the Binomial Distribution:
We use the binomial distribution to mathematically describe the attackers’ behavior.
Consider the random variable:
X = number of attackers who successfully breach the system in a given week
X ~ Binomial(m, p) where:
- X follows a binomial distribution: X ~ Bin(m, p).
- m = number of independent attackers (trials)
- p = probability of successful breach for each attacker (success probability)
The probability that exactly k attackers succeed is:P(X = k) = C(m,k) × pk × (1-p)(m-k)
where C(m,k) is the binomial coefficient (number of combinations).
Note that C(m,k) = m! / [k! * (m-k)!].
SECURITY PROBABILITY DERIVATION
Probability of Security (No Breach):
The server remains secure if and only if no attacker succeeds:P(secure) = P(X = 0) = C(m,0) × p0 × (1-p)m = 1 × 1 × (1-p)m
Probability of Breach (At Least One Success):
The server is breached if at least one attacker succeeds:P(breach) = P(X ≥ 1) = 1 - P(X = 0) = 1 - (1-p)m.
Each week, the system’s state is determined by a binary probabilistic event:
- A downward step (-1) occurs if at least one breach is successful, with a complementary probability of
1−(1−p)m. - An upward step (+1) is taken if the system evades all attackers, which happens with probability
(1−p)m.
Observed Behavioral Trends
Scenario m=1 (Blue): These paths represent a nearly symmetric random walk, with probabilities of an upward or downward step being relatively balanced (P(+1) ≈ 0.6, P(-1) ≈ 0.4). Consequently, the trajectories fluctuate randomly around the origin, with final outcomes distributed between positive and negative values, indicating a highly uncertain security state.
Scenario m=3 (Orange): A distinct negative bias emerges here (P(+1) ≈ 0.22, P(-1) ≈ 0.78). The paths display a clear downward trajectory on average, though substantial week-to-week volatility is present. The majority of simulations conclude with a negative cumulative score.
Scenario m=10 (Red): This scenario exhibits a powerful and consistent negative drive (P(+1) ≈ 0.006, P(-1) ≈ 0.994). The trajectories show an almost monotonic descent with very few, if any, positive corrections, causing all paths to approach the lowest possible score of -100.
Security Implications:
The stark contrast between the scenarios with one versus ten attackers demonstrates the exponential deterioration of system security under multiple independent threats, even when the individual probability of a successful breach is comparatively low (p=0.4).
Counting number of trajectories reach each possible total score
This visualization presents a numerical summary of the final security scores derived from various system configurations, providing empirical validation for our underlying binomial model. Each individual chart displays the outcome distribution generated from 10,000 independent simulation runs.

Primary Findings
- Lower Attacker Count (m=2): The distributions of final scores are broader and cover a wider range of distinct values, indicating a system under moderate adversarial pressure with significant outcome variability.
- Higher Attacker Count (m=5): The distributions are noticeably narrower and shifted towards negative scores, demonstrating a pronounced negative bias induced by the increased number of threats.
Model Confirmation: The close correspondence between the empirically observed frequencies (shown as blue bars) and the theoretically predicted probabilities (represented by the red line) verifies the model’s precision.
Analysis of Emerging Patterns
- For m=2, the final scores are dispersed across a wide spectrum (23 to 47 unique values), a signature of the higher systemic uncertainty in this scenario.
- For m=5, the results are concentrated around deeply negative values (only 9 to 18 unique values), a direct consequence of the substantially elevated likelihood of a security breach each week.
- In all cases, the most commonly occurring scores are in strong agreement with the values anticipated by the theoretical model.
The consistent and accurate fit between the simulated data and the theoretical predictions across all tested parameters offers robust evidence that the final security score, S, adheres to the proposed distribution: S = 2K – n. Here, K—the number of secure weeks—follows a Binomial distribution with parameters n (number of weeks) and (1-p)m (the probability of surviving all attackers in a given week).
Convergence Analysis as n and m Diverge

This figure demonstrates the systematic convergence of empirical score distributions to their theoretical binomial predictions as system parameters diverge.
Analysis by Parameter Variation
Long-Term Behavior (Increasing Time, n)
As the observation period extends indefinitely while the number of attackers remains constant, the score distribution becomes progressively smoother and more bell-shaped. The variability of outcomes grows predictably, while the average score remains stable. This reflects the principle that random fluctuations average out over long timeframes, revealing the underlying statistical truth.
High-Pressure Behavior (Increasing Attackers, m):
When the number of threats grows indefinitely within a fixed timeframe, the distribution shifts drastically and narrows toward the lowest possible score. The curves show a swift progression into negative territory, visually confirming the rapid collapse of security as the likelihood of a breach-free week becomes negligible.
Quantitative Validation
Convergence Metrics:
The discrepancy between the observed and predicted average score diminishes as the number of weeks increases, proving the model’s statistical reliability over time. Similarly, the model’s accuracy improves swiftly as the number of attackers rises, demonstrating its resilience even under extreme adversarial conditions.
Key Insight
The central finding is the universal applicability of the binomial framework. Regardless of whether the system is observed over a long horizon or subjected to intense attack pressure, the simulated behavior consistently converges on the mathematical prediction. This robustly validates the fundamental equation, where the final score is a direct function of the number of secure weeks, which itself follows a binomial distribution: Final Score = 2K – n where K ~ Binomial(n, (1-p)ᵐ).
Conclusions
This study explored the security evolution of a server facing weekly breach attempts by modeling it as a discrete-time stochastic process. The server’s state each week is binary: it either remains secure, increasing its cumulative score by +1, or suffers a breach, decreasing it by –1. The outcome hinges on m independent attackers, each possessing an individual success probability p.
We demonstrated that the probability of a secure week is (1-p)m, making the probability of at least one breach 1 - . This framework interprets the server’s evolving security score as a biased random walk, where the direction of each step is probabilistically determined by the attacker load. This formulation enables the application of established stochastic process theory to analyze system behavior.(1-p)m
Simulated paths vividly illustrate the expected dynamics:
- Under a low number of attackers, the walk exhibits minimal bias, resulting in trajectories that oscillate randomly around the starting point.
- As the number of attackers grows, the chance of a secure week diminishes sharply, introducing a strong negative drift.
- With a high number of attackers, paths show a near-deterministic decline towards the most negative scores.
Furthermore, we analyzed the distribution of final scores after n weeks. The final score is given by S = 2K - n, where K—the count of secure weeks—follows a Binomial distribution with parameters n and (1-p)m. The close alignment between the empirical score distributions and their theoretical binomial counterparts provides robust validation for our probabilistic model.
Our convergence analysis further solidifies these findings:
- As the time horizon
nextends indefinitely, the score distribution becomes smoother and approaches a Normal distribution, consistent with the Central Limit Theorem. - As the number of attackers
mgrows infinitely, the security probability undergoes exponential decay, forcing the score distribution to concentrate at its theoretical minimum. - The systematic reduction in error between simulated and theoretical averages aligns with the Law of Large Numbers, confirming statistical consistency.
In conclusion, this work provides empirical and theoretical evidence that a server’s security score is accurately modeled by a binomial process and behaves as a biased random walk, with its drift governed by the intensity of attacks. The consistent agreement between simulations and analytical predictions confirms that this model offers a reliable mathematical foundation for understanding long-term security dynamics.