BOCPD study materials
BOCPD study resources

BOCPD practice questions

One question at a time. Build your BOCPD understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Domain 1

In Bayesian online changepoint detection, what does the run-length variable r_t represent at time t?

  1. The number of parameters in the predictive model
  2. The total number of changepoints detected so far
  3. The probability that a changepoint occurs at time t
  4. The number of observations since the most recent changepoint Correct answer.

Explanation

The run length tracks how long the current segment has persisted, so r_t equals the count of observations since the last changepoint. When a changepoint occurs the run length resets to zero; otherwise it increments by one each step.

Question 2Domain 1

In the standard BOCPD recursion, the prior probability that a changepoint occurs at any given step is denoted by which quantity?

  1. The hazard rate H Correct answer.
  2. The predictive likelihood
  3. The run length r
  4. The posterior over parameters

Explanation

The hazard rate, often written H or 1/h, gives the constant prior probability of a changepoint at each step. It controls the growth-versus-reset split in the run-length posterior update.

Question 3Domain 1

Which statement best captures the core computational challenge of exact BOCPD?

  1. The hazard rate must be estimated by cross-validation at every step
  2. The parameter posterior cannot be computed in closed form for any model
  3. The predictive distribution requires numerical integration over all past data
  4. The run-length posterior grows linearly with time, so all hypotheses must be maintained Correct answer.

Explanation

Exact inference keeps a probability for every possible run length, so the number of hypotheses grows without bound as t increases. This linear growth is what motivates pruning and approximation schemes.

Question 4Domain 1

When a changepoint is assumed at time t, the run length at t is set to which value?

  1. The previous run length minus one
  2. The previous run length plus one
  3. One
  4. Zero Correct answer.

Explanation

A changepoint means the new segment starts fresh, so the run length resets to zero at that step. Growth by one applies only to the no-changepoint branch.

Question 5Domain 1

Why is a conjugate prior commonly chosen for the segment parameter in BOCPD?

  1. It yields closed-form predictive distributions that are cheap to update Correct answer.
  2. It ensures the number of changepoints is finite
  3. It guarantees the hazard rate is constant over time
  4. It removes the need to track run-length probabilities

Explanation

Conjugacy lets the posterior and the predictive likelihood be computed analytically from updated sufficient statistics. This keeps each run-length hypothesis inexpensive to maintain as data arrive.

Question 6Domain 1

In the message-passing view of BOCPD, the run-length posterior at time t is proportional to which product?

  1. The hazard rate times the number of observations
  2. The predictive likelihood times the prior over new run lengths Correct answer.
  3. The prior over parameters times the hazard rate
  4. The parameter posterior times the run length

Explanation

The update multiplies the predictive likelihood of the new datum under each run-length hypothesis by the prior mass assigned to that run length. Normalizing then gives the posterior over run lengths.

Question 7Domain 1

What is the primary purpose of pruning in approximate BOCPD?

  1. To increase the hazard rate as more data arrive
  2. To replace the conjugate prior with a nonparametric one
  3. To discard run-length hypotheses with negligible posterior mass Correct answer.
  4. To force a changepoint at regular intervals

Explanation

Pruning removes hypotheses whose probability has fallen below a threshold, capping the number of maintained run lengths. This bounds memory and computation while preserving accuracy when dropped mass is tiny.

Question 8Domain 1

A hazard function that is constant over time implies which property of the changepoint process?

  1. Changepoints become more likely as a segment lengthens
  2. Changepoints can never occur in the first few steps
  3. The waiting time between changepoints follows a geometric distribution Correct answer.
  4. The waiting time between changepoints follows a normal distribution

Explanation

A constant per-step hazard produces a geometric distribution over the number of steps until the next changepoint. This is the discrete-time analogue of an exponential waiting time.

Question 9Domain 1

A BOCPD model uses hazard rate H = 0.01 per step. What is the expected run length between changepoints under this constant hazard?

  1. 100 steps Correct answer.
  2. 1 step
  3. 1000 steps
  4. 10 steps

Explanation

With a constant per-step hazard H, the mean number of steps until a changepoint is 1/H. Substituting H = 0.01 gives an expected run length of about 100 steps.

Question 10Domain 1

At time t the run-length posterior has mass 0.6 on r = 5 and 0.4 on r = 2, and the hazard rate is 0.1. Before seeing the new datum, what prior mass is assigned to the changepoint hypothesis r_t = 0?

  1. 0.40
  2. 0.60
  3. 0.10
  4. 0.06 Correct answer.

Explanation

The changepoint branch receives probability equal to the hazard rate times the total posterior mass, since every run length can reset. That is 0.1 times (0.6 + 0.4) = 0.06.

Question 11Domain 1

In the no-changepoint branch of the recursion, the posterior mass at run length r+1 at time t comes from which source at time t-1?

  1. The mass at run length r, scaled by one minus the hazard rate Correct answer.
  2. The mass at run length zero, scaled by the hazard rate
  3. The sum of all run-length masses, scaled by the hazard rate
  4. The mass at run length r, scaled by the hazard rate

Explanation

If no changepoint occurs, a segment of length r grows to r+1, and this happens with probability one minus the hazard. So the mass at r is carried forward and multiplied by (1 - H).

Question 12Domain 1

A segment model is a normal distribution with known variance and unknown mean. Which sufficient statistics must be updated to form the predictive distribution for each run length?

  1. The maximum observed value and its index
  2. The running sum of squared observations only
  3. The running sum of observations and their count Correct answer.
  4. The sample median of the segment

Explanation

With known variance, the normal mean posterior depends only on the count of points and their sum. These two statistics fully determine the updated posterior and predictive distribution.

Question 13Domain 1

Why does BOCPD avoid overfitting to a single segment length when detecting changes?

  1. It marginalizes over all possible run lengths using a full posterior distribution Correct answer.
  2. It fixes the segment length in advance using domain knowledge
  3. It uses a single most likely run length at each step
  4. It re-estimates the hazard rate from the data at each step

Explanation

By maintaining a probability for every run length, BOCPD integrates uncertainty about when the last changepoint occurred. Predictions and detections therefore average over many candidate segmentations rather than committing to one.

Question 14Domain 1

A practitioner wants faster detection of abrupt changes at the cost of more false alarms. How should the hazard rate be adjusted?

  1. Keep the hazard rate but increase the prior variance
  2. Decrease the hazard rate
  3. Increase the hazard rate Correct answer.
  4. Set the hazard rate to zero

Explanation

A larger hazard raises the prior probability of a reset at each step, making the model quicker to declare changepoints. The trade-off is a higher rate of spurious detections.

Question 15Domain 1

What does the run-length posterior at time t represent as a distribution?

  1. A distribution over the observation noise level
  2. A distribution over the values of the segment mean
  3. A distribution over the total number of future changepoints
  4. A probability distribution over how long the current segment has lasted Correct answer.

Explanation

The run-length posterior assigns probability to each candidate run length, reflecting belief about the age of the current segment. It is not a distribution over parameter values or future events.

Question 16Domain 1

In a BOCPD model with unknown mean and unknown variance for normal data, which prior is the standard conjugate choice?

  1. A Dirichlet prior
  2. A beta prior
  3. A normal-inverse-gamma prior Correct answer.
  4. A Poisson prior

Explanation

The normal-inverse-gamma prior is conjugate for a normal likelihood with both mean and variance unknown. It yields closed-form predictive distributions based on updated sufficient statistics.

Question 17Domain 1

A run length has posterior probability 0.0001 and a pruning threshold is set at 0.001. What does the pruning rule do with this hypothesis?

  1. It keeps the hypothesis but halves its probability
  2. It removes the hypothesis from the maintained set Correct answer.
  3. It increases the hazard rate for that hypothesis
  4. It resets the hypothesis to run length zero

Explanation

Pruning discards any run length whose posterior mass falls below the threshold. Here 0.0001 is below 0.001, so the hypothesis is dropped to save computation.

Question 18Domain 1

Why might a bounded-lookback approximation be preferred over full pruning in some BOCPD deployments?

  1. It guarantees exact posterior inference
  2. It eliminates the need to choose a hazard rate
  3. It removes the requirement for a conjugate prior
  4. It caps the number of maintained run lengths by a fixed window, giving predictable cost Correct answer.

Explanation

A bounded lookback keeps only run lengths up to a fixed maximum, so memory and compute per step are constant. This predictability is valuable in streaming systems even though it is approximate.

Question 19Domain 1

In the run-length recursion, what happens to the total number of candidate run lengths after a changepoint is strongly supported?

  1. The hazard rate is automatically reduced
  2. The parameter posterior is reset to the prior for all segments
  3. Older hypotheses lose mass, so effective support concentrates on recent run lengths Correct answer.
  4. All hypotheses are permanently deleted from the model

Explanation

When a changepoint is likely, probability shifts toward short run lengths and long-run hypotheses decay. The number of candidates still grows in principle, but effective support narrows.

Question 20Domain 1

A segment uses a normal model with known variance 4 and prior mean 0 with prior variance 1. After observing a single value of 4, what is the posterior mean of the segment mean?

  1. 3.2 Correct answer.
  2. 2.0
  3. 4.0
  4. 0.8

Explanation

The posterior mean is a precision-weighted average of the prior mean and the observation. Precision weights are 1/1 = 1 for the prior and 1/4 = 0.25 for the data, giving (1*0 + 0.25*4)/(1.25) = 3.2.

Question 21Domain 1

A model uses hazard H = 0.05 and the run-length posterior at t-1 places all mass on r = 3. Ignoring the likelihood, what is the prior mass on run length 4 at time t?

  1. 0.0475
  2. 0.05
  3. 0.95 Correct answer.
  4. 1.00

Explanation

Since all mass sits on r = 3, the growth branch carries it to r = 4 with probability one minus the hazard. That gives 1 - 0.05 = 0.95.

Question 22Domain 1

Which statement best explains why BOCPD is described as online and causal?

  1. Its estimate at time t uses only data up to t and updates incrementally Correct answer.
  2. It uses future observations to smooth past changepoint estimates
  3. It requires the entire series to be stored before inference begins
  4. It recomputes the full posterior over all data at every step

Explanation

The recursion updates the run-length posterior as each observation arrives, using only past and current data. This makes it suitable for streaming detection where future data are unavailable.

Question 23Domain 1

Two BOCPD models differ only in hazard rate: model A uses 0.02 and model B uses 0.005. What is the expected qualitative difference in detected changepoints?

  1. Model A detects changes sooner but reports more spurious ones Correct answer.
  2. Both detect identical changepoints because the likelihood dominates
  3. Model B detects changes sooner but reports more spurious ones
  4. Model A never detects any changepoints because its hazard is larger

Explanation

A higher hazard raises the prior probability of resets, so model A responds faster to genuine changes but also flags more noise. Model B, with a lower hazard, is more conservative and slower.

Question 24Domain 1

In the growth branch, the predictive likelihood for run length r+1 is computed using which parameter posterior?

  1. The marginal posterior averaged over all run lengths
  2. The prior distribution before any data are observed
  3. The posterior conditioned on the segment associated with run length r at the previous step Correct answer.
  4. The posterior of the most recent changepoint segment only

Explanation

A segment of length r grows to r+1, so its predictive distribution uses the parameter posterior built from that same segment's data. Each run-length hypothesis carries its own sufficient statistics.

Question 25Domain 1

Why can the run-length posterior be updated sequentially without storing the entire observation history?

  1. The hazard rate encodes all past observations implicitly
  2. Each hypothesis carries sufficient statistics that are updated incrementally Correct answer.
  3. Run lengths are independent of the parameter posterior
  4. The predictive likelihood does not depend on past data

Explanation

Sufficient statistics per run length summarize everything needed from the segment's past. Updating them with each new observation avoids retaining the raw history.

Question 26Domain 1

In Bayesian online changepoint detection, what does the run length r_t at time t count?

  1. The number of steps until the next changepoint is expected
  2. The number of observations since the most recent changepoint Correct answer.
  3. The number of candidate segment models kept in memory
  4. The number of changepoints detected so far in the stream

Explanation

The run length is defined as the age of the current segment, so it counts how many observations have arrived since the last changepoint occurred. When a changepoint happens the run length resets to zero, and otherwise it increments by one each step.

Question 27Domain 1

Which quantity does the hazard function H(r) represent in BOCPD?

  1. The average magnitude of the change at a detected changepoint
  2. The probability that a changepoint occurs at the next step given the current run length Correct answer.
  3. The rate at which pruning removes low-probability run lengths
  4. The probability that the current segment model is misspecified

Explanation

The hazard function is a conditional probability of a change point at time t+1 given that no change has occurred up to time t, indexed by the current run length. It controls the prior mass assigned to the reset branch of the recursion.

Question 28Domain 1

What role does the predictive likelihood play in the BOCPD recursion?

  1. It sets the prior probability of a changepoint before any data are seen
  2. It determines which run lengths are removed during pruning
  3. It weights each candidate run length by how well its segment model explains the new observation Correct answer.
  4. It normalises the run-length posterior so that it sums to one

Explanation

For each candidate run length, the predictive likelihood is the probability of the new datum under that segment's posterior predictive distribution. Multiplying the prior run-length mass by this term produces the unnormalised posterior, so segments that predict the datum poorly lose mass.

Question 29Domain 1

Which distribution family is the standard conjugate prior for the mean of a normal segment model with known variance?

  1. Gamma
  2. Dirichlet
  3. Beta
  4. Normal Correct answer.

Explanation

When the variance is known, a normal prior on the mean is conjugate, giving a normal posterior whose mean is a precision-weighted average of prior and data. This closed form makes the predictive likelihood available in closed form.

Question 30Domain 1

Why is BOCPD considered a causal or online algorithm?

  1. It uses future observations to smooth the run-length posterior
  2. It requires the full dataset to be re-analysed after each new observation
  3. It assumes changepoints can only occur at fixed calendar times
  4. Its estimate at time t depends only on observations up to time t Correct answer.

Explanation

BOCPD updates the run-length posterior sequentially as each datum arrives, so the state at time t uses only data observed so far. This makes it suitable for streaming settings where future data are unavailable.

Question 31Domain 1

In the run-length recursion, what is the prior weight assigned to the changepoint branch (run length reset to zero) at time t?

  1. The uniform value one divided by the number of candidate run lengths
  2. The previous run-length posterior mass multiplied by the hazard evaluated at that run length Correct answer.
  3. The predictive likelihood of the new observation under the full-history model
  4. The previous run-length posterior mass multiplied by one minus the hazard

Explanation

The reset branch receives, for each previous run length, its posterior mass times the hazard at that run length, summed over all candidates. This aggregated quantity becomes the prior mass on run length zero before the new datum is incorporated.

Question 32Domain 1

What happens to the run-length posterior when a changepoint is strongly supported by the new observation?

  1. Mass shifts toward small run lengths, including zero Correct answer.
  2. The posterior stops being updated until the next changepoint
  3. The posterior becomes uniform over all run lengths
  4. Mass concentrates on the largest run lengths

Explanation

A datum that is poorly explained by long-run segment models reduces their predictive likelihood, so relative mass moves to short run lengths that were recently reset. A very surprising observation therefore produces a sharply peaked posterior near zero.

Question 33Domain 1

Which statement best describes the computational cost of exact BOCPD after t observations?

  1. It grows linearly with t because the number of candidate run lengths grows by one each step Correct answer.
  2. It stays constant because the number of run lengths is fixed in advance
  3. It shrinks over time because old run lengths are always discarded
  4. It grows quadratically with t because all past pairs of observations are compared

Explanation

At each step the recursion considers every surviving run length, and the set of candidate run lengths grows by one per observation under exact inference. The per-step cost therefore scales with the number of candidates, giving linear growth overall.

Question 34Domain 1

A segment model is a Poisson distribution with unknown rate. Which prior is conjugate for the rate parameter?

  1. Normal
  2. Inverse chi-squared
  3. Beta
  4. Gamma Correct answer.

Explanation

The gamma distribution is conjugate to the Poisson likelihood, so the posterior over the rate remains gamma and the negative binomial predictive likelihood is available in closed form. This makes the segment update cheap within BOCPD.

Question 35Domain 1

A BOCPD model uses a constant hazard of 0.01 per step. What is the prior probability that a segment lasts at least 50 steps before a changepoint occurs?

  1. Approximately 0.61 Correct answer.
  2. Approximately 0.01
  3. Approximately 0.39
  4. Approximately 0.50

Explanation

With a constant hazard the segment length follows a geometric distribution, so the probability of surviving 50 steps is 0.99 raised to the power 50, which is about 0.605. The hazard applies at each step independently of the run length.

Question 36Domain 1

A normal segment has known variance 1 and a normal prior on the mean with mean 0 and variance 1. After observing the single value 2, what is the posterior mean?

  1. 2
  2. 1 Correct answer.
  3. 0.5
  4. 1.5

Explanation

With equal prior and likelihood precisions, the posterior mean is the average of the prior mean and the observation, giving (0 + 2) divided by 2, which is 1. The posterior variance is also halved relative to the prior.

Question 37Domain 1

At time t-1 the run-length posterior places all mass on r = 4, and the hazard is 0.2. Ignoring the likelihood, what prior mass does run length 0 receive at time t?

  1. 0.04
  2. 0.2 Correct answer.
  3. 0.8
  4. 1.0

Explanation

The reset branch aggregates posterior mass times the hazard, and here the only candidate has mass one and hazard 0.2, so the reset prior mass is 0.2. The remaining 0.8 flows to the growth branch at run length 5.

Question 38Domain 1

Why does the run-length posterior allow BOCPD to represent uncertainty about where changepoints occurred rather than committing to one segmentation?

  1. It selects the single most likely changepoint location and discards the others
  2. It uses a maximum likelihood estimate of the segment boundary at each step
  3. It averages the data over fixed windows of equal length
  4. It maintains a probability distribution over all plausible segment ages simultaneously Correct answer.

Explanation

The posterior assigns mass to every candidate run length, so several competing segmentations coexist with different weights. This distributional representation propagates uncertainty forward instead of forcing an early hard decision.

Question 39Domain 1

How does the run-length posterior typically behave immediately after a genuine abrupt change has been processed?

  1. It becomes bimodal between the old and new segment lengths permanently
  2. It remains concentrated on the long run lengths of the previous segment
  3. It collapses to a single deterministic run length for all future steps
  4. It concentrates on short run lengths and then gradually spreads to longer ones as the new segment ages Correct answer.

Explanation

Right after a change the posterior favours run lengths near zero because the new data are inconsistent with the old segment. As subsequent observations accumulate and agree with the new segment, mass migrates toward progressively longer run lengths.

Question 40Domain 1

A stream has 10000 observations and a pruning threshold of 0.001 is used. What is the main practical benefit of pruning in this setting?

  1. It guarantees that no changepoint is ever missed
  2. It bounds the number of retained run lengths so per-step cost stays manageable Correct answer.
  3. It removes the need to specify a hazard function
  4. It improves the accuracy of the predictive likelihood for each segment

Explanation

Without pruning the number of candidate run lengths grows with the stream length, so pruning discards negligible-probability candidates and keeps the active set small. The trade-off is a controlled approximation error rather than exactness.

Question 41Domain 1

In the growth branch, the run-length posterior mass at r+1 at time t is proportional to which combination?

  1. The previous mass at r times the predictive likelihood under the full history model
  2. The previous mass at r divided by the number of candidate run lengths
  3. The previous mass at r times one minus the hazard at r times the predictive likelihood under the segment updated with the new datum Correct answer.
  4. The previous mass at r times the hazard at r times the predictive likelihood under a fresh prior

Explanation

Growth means no changepoint occurred, so the previous mass at r is multiplied by the survival probability one minus the hazard. The segment model at r is then updated with the new datum, and its predictive likelihood weights the result.

Question 42Domain 1

A practitioner observes frequent false alarms on stable data. Which adjustment to the hazard function is most appropriate?

  1. Increase the hazard rate to make changepoints more likely
  2. Decrease the hazard rate to make changepoints rarer a priori Correct answer.
  3. Set the hazard rate to exactly 0.5
  4. Remove the hazard function entirely and rely on the likelihood

Explanation

A lower hazard rate assigns less prior mass to the reset branch, so stronger evidence is needed before short run lengths dominate. This reduces false alarms at the cost of slower detection of genuine changes.

Question 43Domain 1

Why does the run-length posterior become increasingly peaked over time in a stationary stream with no changepoints?

  1. The segment model variance shrinks to zero, forcing a single run length
  2. The hazard function decreases automatically as the run length grows
  3. Normalisation removes all but one candidate at each step
  4. Long run lengths accumulate consistent evidence and their predictive likelihoods stay relatively high Correct answer.

Explanation

When data remain consistent with one segment, the long-run model keeps predicting well while recently reset models have less supporting evidence. The posterior therefore concentrates on the growing run length, reflecting increasing confidence that no change has occurred.

Question 44Domain 1

A bounded-lookback approximation keeps only run lengths up to a maximum L. What is its main effect on inference?

  1. It removes the need for a segment model
  2. It caps memory and cost while potentially missing very old changepoint hypotheses Correct answer.
  3. It guarantees detection of changes that occur less often than L steps
  4. It makes the run-length posterior exact for all run lengths

Explanation

Truncating the run-length support at L bounds the number of candidates and hence memory and computation. The cost is that hypotheses about segments longer than L steps are discarded, which can bias estimates in very stable streams.

Question 45Domain 1

Which statement correctly compares pruning with bounded lookback as approximations to BOCPD?

  1. Both methods drop candidates solely by age
  2. Pruning drops candidates by age, while bounded lookback drops them by probability threshold
  3. Both methods drop candidates solely by probability threshold
  4. Pruning drops candidates by probability threshold, while bounded lookback drops candidates by age Correct answer.

Explanation

Pruning is adaptive: it removes run lengths whose posterior mass falls below a threshold regardless of age. Bounded lookback is structural: it removes all run lengths beyond a fixed maximum, regardless of their probability.

Question 46Domain 1

In a BOCPD model with a constant hazard H, what is the prior distribution of the segment length?

  1. Geometric with parameter H Correct answer.
  2. Exponential with rate H
  3. Poisson with mean H
  4. Uniform over all positive integers

Explanation

A constant per-step changepoint probability produces a geometric distribution over segment lengths, with mean one over H. This is why the expected run length between changepoints equals the reciprocal of the hazard.

Question 47Domain 1

A segment model is a normal distribution with unknown mean and unknown variance, using a normal-inverse-gamma prior. Which statistics must be tracked to update the posterior?

  1. The running sum and the hazard rate
  2. The count and the maximum observed value
  3. The count, the running sum, and the running sum of squares Correct answer.
  4. Only the count of observations in the segment

Explanation

The normal-inverse-gamma posterior depends on the number of observations, their sum, and their sum of squares, which together determine the updated mean and variance parameters. These sufficient statistics can be updated incrementally as each datum arrives.

Question 48Domain 1

A BOCPD run-length posterior at time t places mass 0.5 on r = 0 after a detected change, and the hazard is constant at 0.05. What does this large mass at r = 0 most directly indicate?

  1. The algorithm has failed to normalise the posterior
  2. The segment model has infinite variance
  3. The hazard function must have been misspecified
  4. The new observation is much better explained by a freshly started segment than by longer ones Correct answer.

Explanation

Mass at run length zero means the reset hypothesis predicts the latest datum far better than the surviving long-run hypotheses do. That is the signature of a change supported by the data rather than an artefact of normalisation.

Question 49Domain 1

Two BOCPD models differ only in hazard, one at 0.1 and one at 0.001. How do their expected run lengths and detection behaviour compare?

  1. The 0.001 model has a ten-step expected run length and detects changes faster but alarms more
  2. The 0.1 model has a ten-step expected run length and detects changes faster but alarms more Correct answer.
  3. The 0.1 model has a thousand-step expected run length and is more conservative
  4. Both models have identical expected run lengths because the hazard only affects normalisation

Explanation

With a constant hazard the expected run length is the reciprocal of the hazard, so 0.1 gives about ten steps and 0.001 gives about a thousand. The higher hazard shifts prior mass to short segments, producing quicker detection with more false alarms.

Question 50Domain 1

A stream alternates between long stable periods and brief bursts of rapid changes. Which modelling choice best balances responsiveness and stability?

  1. A single very high constant hazard chosen for the bursts
  2. A hazard that depends on the current run length, rising for very long segments Correct answer.
  3. Removing the hazard and detecting changes only by thresholding residuals
  4. A single very low constant hazard chosen for the stable periods

Explanation

A run-length-dependent hazard can stay low for short and moderate segments while rising for very long ones, giving stability during bursts and eventual sensitivity in long stable stretches. A single constant hazard must trade one regime against the other.