- Published on
Modeling Resilience: A Computational Exploration of Option B
- Authors

- Name
- Hani Al-Shater
Introduction: When Life Deals an Option B
Life, in its beautiful complexity, often unfolds differently than we plan. We map out our "Option A" – our ideal career path, the future we envision with loved ones, our expectations for health and happiness. But as Sheryl Sandberg and Adam Grant so powerfully articulate in their book, Option B: Facing Adversity, Building Resilience, and Finding Joy, unforeseen events can shatter this Option A. Loss, failure, trauma, or profound disappointment can thrust us into an "Option B" – a new, often unwelcome, reality that we must navigate.
The central message of Option B is one of profound hope and agency. It's not merely about surviving this new state but about actively building within it. The book illuminates the path by focusing on several key human capacities:
Resilience: This isn't a fixed trait one is born with, but rather a strength that can be cultivated. It involves how we process adversity, challenge negative thought patterns (like the "three P's": personalization, pervasiveness, and permanence), and consciously seek out moments of gratitude and self-compassion.
Support Systems: The book underscores the vital role of human connection – our friends, family, and community – in providing comfort, practical assistance, and the strength to persevere.
Active Coping and Meaning-Making: Option B champions the idea that even in the face of immense hardship, we can make choices that foster healing, help us find new meaning, and ultimately, rediscover joy.
Inspired by these powerful ideas, this HaniXCommute report turns these ideas into code that would allow for better quantitative understanding by detailing individual journeys into computational models. We aim to simulate and understand, even in a simplified way, how some of these dynamics might play out. Can we explore how an individual's baseline state, the severity of a setback, and their "coping resources" (a combination of inner resilience and external support) might shape their trajectory as they build their Option B?
Our Approach: Simulating Journeys and Building a Model
To explore these complex human experiences, we turned to simulation and Bayesian modeling.
Why Simulate?
Real-world longitudinal data on trauma, resilience, support, and recovery is incredibly rich but also complex and often hard to obtain with all the desired variables for a specific modeling goal. Simulation allows us to create a controlled "laboratory." We can define specific characteristics for hypothetical individuals and observe how different factors might lead to a diverse range of outcomes, based on rules we design to be plausible.
Designing the Simulation: A Timeline of Change
Our simulation created data for 50 hypothetical individuals, each experiencing a three-part journey:
- The "Option A" Phase: A period where individuals exhibit a relatively stable level of skill or well-being (let's call this K_OptionA)
- The Trauma Event: A specific point in time marking a disruptive event
- The "Option B" Phase: The period following the trauma, where individuals adjust and recover over time
For each simulated individual, we defined:
- k_option_a_level: Their baseline skill/well-being in Option A
- trauma_severity: The intensity of the disruptive event they faced
- resilience_score & support_score: To represent their internal and external resources. For our simplified model, these were combined into a single coping_resources_score (CR)
The rules for how these factors influenced recovery were designed to create varied paths in the "Option B" phase – some individuals might get "stuck" at a low level, some might partially recover, others might fully return to their Option A baseline, and a few might even experience Post-Traumatic Growth (PTG), surpassing their original state. The parameters for this simulation were informed by general psychological principles and the insights from Option B to ensure the generated scenarios, while synthetic, were diverse and meaningful for our modeling exploration.
FIGURE 1: Sample Trajectories (Option A & B) from Revised Synthetic Data. This plot shows the raw skill trajectories over time for a selection of our 50 simulated individuals. Each colored line represents one individual. The plot clearly marks the "Option A" phase (stable skill), the "Trauma Event" (vertical dashed line), and the subsequent "Option B" phase. Diverse recovery paths (e.g., getting stuck, partial recovery, full recovery, post-traumatic growth, varying speeds) are visible.The Modeling Goal: Understanding the Shape of Recovery
Our primary goal was to build a model that could learn from these simulated Option B trajectories. Specifically, we wanted to understand how an individual's Option A skill level (K_OptionA), the Trauma Severity (T) they experienced, and their Coping Resources (CR) influence the shape of their recovery curve over time in Option B.
Introducing the Bayesian Model (Conceptual)
We used a Bayesian hierarchical model, built with the Python library PyMC. At its heart, we assume that an individual's recovery in Option B can be described by a logistic curve. This S-shaped curve is useful because it can represent a common pattern:
- An initial skill level just after trauma (the K_Floor)
- A period of change (the recovery itself)
- An eventual stabilization at a new skill level (the K_Asymptote)
The exact shape of this curve for each individual (how low the floor is, how high the asymptote is, how quickly the recovery happens (Rate), and when the main phase of recovery occurs (Midpoint)) is what we want to understand. Our model proposes that these individual curve parameters are influenced by their K_OptionA, T, and CR scores, through a set of "global rules" (parameters) that the model learns from all the data.
The Model's Blueprint: A Plate Diagram
To visualize the structure of our (simplified) Bayesian model, we use a plate diagram. Plate notation helps show which parts of the model are repeated for different individuals or observations.
- Circles/Nodes: Represent variables (observed data or parameters the model estimates). Shaded nodes are observed data
- Rectangles (Plates): Enclose parts of the model that are repeated. For example, we have a "plate" for individuals because the recovery process is modeled for each person
- Arrows: Show dependencies (e.g., an individual's Coping Resources score influences their estimated Recovery Rate)
FIGURE 2: Simplified Plate Diagram for the Option B Recovery Model. This diagram illustrates the hierarchical structure of our simplified Bayesian model. Global Hyperparameters (top row, e.g., "Trauma Drop Factor," "Coping Boost to Asymptote") are estimated from all data and define general relationships. These global parameters, along with an individual's specific characteristics (, , ) shown within the "Individuals" plate, determine their unique recovery curve parameters (, , , ).The core mathematical idea for predicting skill in Option B for individual at time within our PyMC model is the logistic function:
The model then assumes that the Observed Skill () is drawn from a Normal distribution centered around this Predicted Skill.
The Story Told by the Data: How Coping Resources Shape Option B
After our PyMC model processes all the simulated individual journeys, it provides estimates for the "global parameters." These parameters reveal the average underlying "rules" of recovery it has learned. Let's explore what these findings tell us:
The Initial Fall from Option A
The model estimates a Trauma Drop Factor (). A value like 0.06 would mean that for each unit of Trauma Severity, an individual's skill is expected to drop by about 6% of their original Skill in Option A () to establish their initial Skill Floor post-Trauma ().
Example: If and , the floor might be estimated around:
The Recovery Horizon – Reaching a New Asymptote ()
The model estimates a Baseline Recovery % () (e.g., a mean around 0.80). This suggests that, on average, individuals might recover to about 80% of their Option A skill level, before considering their coping resources.
Critically, the Coping Boost to Asymptote () parameter (e.g., a mean around 0.07) tells us how much Coping Resources () can elevate this.
Example: If , the baseline recovery asymptote might be:
If an individual has a high normalized Coping Resource score of 0.8 (e.g., 8/10), this could add an additional:
This pushes their potential recovered skill to around 68.5. If were higher, or the baseline allowed it, this term is what enables the model to predict full recovery or even Post-Traumatic Growth for those with very high coping resources.
The Pace and Timing of Recovery (Rate & Midpoint )
The model learns a Baseline Log-Rate () (e.g., corresponding to a moderate recovery speed) and a Baseline Log-Midpoint () (e.g., corresponding to the main recovery phase occurring around the middle of the Option B observation period).
The Coping Effect on Rate () (e.g., a positive value like 0.10) shows that higher Coping Resources significantly accelerate the recovery speed ().
The Coping Effect on Midpoint () (e.g., a negative value like -0.12) is also key: higher Coping Resources lead to an earlier midpoint (), meaning the recovery process gains momentum sooner.
Example: An individual with strong coping resources wouldn't just recover more fully; they would also recover faster and start that significant phase of healing sooner than someone with fewer coping resources, even if they faced similar trauma.
The Unseen Variation
An observation noise parameter (like Variability in Option B Skill () with a mean around 5.0) tells us that individual skill observations will naturally fluctuate around their true underlying recovery curve.
FIGURE 3: Individual Journeys - Model Fits and Predictions. This multi-panel plot displays the model's interpretation for a selection of individual simulated journeys. Each subplot shows one individual's observed "Option A" data (light blue circles), their "Option B" data (coral squares), their original Option A level (dotted blue line), and the trauma event (vertical red line). Overlaid are many faint grey lines representing plausible recovery trajectories from the model's posterior predictive distribution, and a black dashed line indicating the mean predicted recovery trajectory.By looking at Figure 3, we can visually confirm these points. We see individuals with low Coping Resources exhibiting flatter, lower recovery trajectories, consistent with the model estimating a low Asymptote and slow Rate for them. Conversely, individuals with high Coping Resources show steeper, upward curves, potentially reaching or exceeding their Option A levels, reflecting the model's higher estimated Asymptote, faster Rate, and earlier Midpoint for them.
Reflections: Option B, Resilience, and What We Can Build
This modeling journey, inspired by Option B, reinforces its central themes through a quantitative lens. While the initial shock of trauma can significantly alter our life's trajectory, our capacity to cope – our combined inner resilience and the support we draw from others – appears to be a powerful determinant of not just whether we recover, but how well and how quickly.
Our simplified model suggests that:
Higher Coping Resources don't just buffer the fall slightly; they actively contribute to reaching a higher level of functioning (a better ) in Option B. They are what can make Option B a place of genuine recovery and even growth.
Strong Coping Resources also fundamentally alter the timeline of recovery, accelerating the process and bringing forward the point at which significant healing occurs.
This isn't to say the path is easy or that these factors guarantee a specific outcome. Human experience is far richer and more variable than any model can capture. But it does align with the empowering message of Option B: that we are not merely passive victims of circumstance. By understanding the roles of resilience and support, and by actively working to cultivate them, we can influence the shape of our Option B, building a future that, while different from Option A, can still be rich with meaning, strength, and even joy.
Conclusion, Limitations, and the Next Commute Fun!
This report, marking the first part of our exploration, has journeyed through the landscape of adversity and recovery, using the compassionate lens of Option B as our guide. We have detailed the process of simulating diverse individual responses to life-altering setbacks and subsequently building a simplified Bayesian model to illuminate the key drivers, such as trauma severity and coping resources, that shape these recovery trajectories. Our findings, drawn from the patterns inherent in our synthetic data, offer quantitative echoes of profound qualitative insights: resilience and support are indeed crucial navigators in the journey away from a shattered "Option A" towards building a hopeful and functional "Option B."
It is, of course, essential to frame these initial findings within their context and acknowledge the current limitations:
The Nature of Simulation: This model was built on synthetic data. While we meticulously designed this data to be plausible and rich in variation – drawing on established psychological concepts and the insights from Option B itself to create sensible scenarios – it is not a direct representation of real-world individual data.
The Bounds of Simplification: To make the modeling process tractable and the results interpretable, "Coping Resources," "skill," and "trauma" were operationalized as single scores or parameters. Similarly, the logistic curve represents one of many potential mathematical forms that a recovery process might take. Human experience is invariably more multifaceted.
The Model as an Exploratory Tool: It's crucial to view this model as a tool for thought, a way to formalize and explore hypotheses. It is not intended as a deterministic predictor of any single individual's life path but rather as a way to understand average trends and influential factors.
Despite these inherent limitations, such modeling exercises provide significant value. They encourage systematic thinking about deeply complex psychological processes. They allow us to illustrate, in a more concrete way, the potential impact of factors like resilience and support – elements that we, as individuals and communities, can actively foster.
The insights and methodological groundwork from this first part, however, are not the final chapter. They lay a crucial foundation for the next part of this play. In our next phase, we aim to build upon these learnings, potentially addressing some of the current limitations by exploring more advanced data generation techniques – perhaps leveraging the narrative richness of AI-generated individual stories to create even more nuanced synthetic populations, learning from implicit knowledge including individual stories the AI models were trained on – or by taking steps towards validating these simulated dynamics against broader patterns observed in real-world data, if available. The goal will be to further refine our understanding and perhaps develop even more sophisticated models of human adaptation.
Ultimately, the journey from a shattered Option A to a rebuilt Option B is unique and deeply personal for everyone who undertakes it. Yet, by continuing to explore and understand the dynamics of resilience, support, and active coping, we hope to further illuminate the paths that not only lead through adversity but can also reveal new strengths and possibilities along the way.
Explore the full computational model on Google Colab.