Jet Lag
In this tutorial, we introduce a Bayesian Network that models the causal dependencies between travel-related and personal factors that can affect the severity of jet lag. The network enables probabilistic reasoning to estimate outcomes such as: the severity of jet lag; recovery time; recommended actions to minimize the impact of jet lag.
You will learn:
How to perform inference, using either the model editor or the SDK
How to use inference to query a Bayesian model and reason about the probability of different outcomes
How to interpret results from probabilistic queries to support personalized recommended actions
Setting the Context
Jet lag is a physiological response to long-distance travel across multiple timezones. It disrupts the body’s circadian rhythm and often results in fatigue and poor sleep. The severity of jet lag—as well as the appropriate recovery strategy—depends on a combination of travel-related and personal factors, such as flight distance, direction of travel, in-flight sleep duration, age group, and resilience to jet lag.
We would like to estimate the most suitable action that a traveler can take to mitigate jet lag, based on the traveler's journey and their personal characteristics.
Using probabilistic inference, we aim to answer the following questions:
Given a traveler's flight distance and other observed factors, what is the most probable action that will lead to better recovery time?
How does in-flight sleep duration impact the recommended Action for jet lag recovery?
Other types of questions that this model could answer include:
What is the probability that a traveler will experience severe jet lag, given their flight distance, direction of travel, and in-flight sleep duration?
How do age group and resilience to jet lag influence the likelihood of experiencing jet lag?
How does a chosen action influence the recovery time?
The dataset and the model file are provided below for download:
Jet Lag Model
First, let us take a look at the model of the Bayesian Network for our jet lag example.
Distance
[6000, 8000, 10000, 12000, 14000]
Total flight distance in km
DirectionOfTravel
[Eastward, Westward]
Direction of travel (east or west)
CircadianDisruptionLevel*
[Low, Med, High]
Severity of circadian disruption
SleepDuringFlight
[10, 8, 6, 4, 2]
Number of hours the traveler slept in-flight
ResilienceToJetLag*
[Low, High]
Traveler's resilience to jet lag
AgeGroup
[15-25, 26-40, 41-60, 60+]
Age range of the traveler
JetLagged
[Low, Med, High]
Severity of jet lag
Action
[No Action, Environment, Melatonin, Prescription]
Recommended recovery strategy
RecoveryTime
[1, 2, 3, 4]
Number of days expected for recovery
*These are latent variables for which data would not likely be directly observed in practice, but for the purposes of this tutorial, we assume the values are provided.
Our Bayesian Network takes the following graph structure, which visually encodes how these variables interact with one another:

We can see that:
Distance and DirectionOfTravel influence CircadianDisruptionLevel
CircadianDisruptionLevel and SleepDuringFlight influence ResilienceToJetLag
ResilienceToJetLag, Distance, and AgeGroup influence JetLagged
JetLagged, SleepDuringFlight, and Distance influence the recommended Action
And finally, RecoveryTime is influenced by the Action taken
These relationships enable a comprehensive view of how travel and individual factors combine to affect jet lag outcomes and support data-informed decisions for managing jet lag recovery.
Inference
Travel Distance
How does flight distance influence the recommended Action that a traveler should take to recover from jet lag?
Let's consider a few scenarios for the following traveler profile:
DirectionOfTravel = 'Eastward'
SleepDuringFlight = '6 (hrs)'
AgeGroup = '26-40'
This information will be our evidence, and we want to understand how the recommended Actions will change for three scenarios, each with a different FlightDistance.
Scenario A — 6000km
At a travel distance of 6000 km, the model predicts mild disruption. It is most likely that No Action is recommended, with a 66.6% probability. However, we can see that some travelers may be recommended to make adjustments to their Environment, such as using blue light in their room, or to take Melatonin to assist with sleep.
Scenario B — 10000km
At a travel distance of 10000km, recommendations for Melatonin and Environment become more likely than in our first scenario, while the likelihood that No Action is recommended drops from 66.6% to 32.9%.
Scenario C — 14000km
At a travel distance of 14000 km, severity peaks. The most likely recommendation, with a 61.6% probability is for a Prescription sleep aid.
So, for this travel profile, as FlightDistance increases, more drastic Actions are likely to be recommended.
In-Flight Sleep
Now, let's say that the traveler's FlightDistance is 12000km.
What happens when our traveler gets more hours of sleep during their flight? Our evidence is now:
DirectionOfTravel = 'Eastward'
Distance = '12000(km)'
AgeGroup = '26-40'
SleepDuringFlight = '10 (hrs)'
Even at a travel distance of 12000km, getting 10 hours of rest during the flight reduces the likelihood of recommending more drastic Actions for recovery.
It is most likely that No Action is recommended with 39.4% probability. Environment or Melatonin are much more likely recommendations than a Prescription.
Last updated