---
title: "A posterior for two explanations"
description: "Build a joint Gaussian-process model for velocity and activity, derive its derivative covariance and retain uncertainty when orbit and activity compete."
canonical_url: "https://sandboxphysics.com/stories/rv-activity/a-posterior-for-two-explanations/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/rv-activity/a-posterior-for-two-explanations/"
last_modified: "2026-10-28"
---

[Stellar Activity and Radial Velocity](https://sandboxphysics.com/stories/rv-activity/)

AC18 · L3

# A posterior for two explanations

Sandbox Physics · 2026-10-28

If both an orbit and a rotating surface can explain a signal, subtracting one favorite curve leaves an artificially simple problem. A posterior keeps the competing allocations, including their correlations.

## Before you begin

Weighted least squares, multivariate Gaussian distributions and derivatives. The surface chapter supplies the reason to expect both light-weight and velocity-like activity terms.

## A shared process, two responses

Let a dimensionless latent process represent evolving active coverage. A calcium indicator can track that coverage, while a velocity can respond both to coverage and its rate of change. This motivates a compact joint model. It is a statistical response model, not a recovered stellar surface.

$$
y_v(t)=m_{\rm Kep}(t)+\gamma_v+aG(t)+b\dot G(t)+\epsilon_v,\qquad y_h(t)=\gamma_h+A G(t)+\epsilon_h
$$

Time is in days, so the derivative coefficient carries metres-per-second times days. Calcium values are centered at minus 4.72 and divided by 0.01; the positive calcium coefficient fixes the latent sign convention. The velocity origin is the fixed 31180 metres per second.

We use a unit-variance quasi-periodic covariance: nearby times correlate, similar rotation phases correlate, and an evolution scale eventually erases that similarity. The symbol for periodic width below uses Rajpaul’s normalization; Haywood’s width parameter differs by a factor of two. Copying a numerical width without its equation would change the prior.

$$
k(\tau)=\exp\left[-\frac{\tau^2}{2\ell_e^2}-\frac{\sin^2(\pi\tau/P_r)}{2\ell_p^2}\right],\qquad \tau=t-t'
$$

This is a stationary phenomenological kernel. Its recurrence time need not be a perfectly measured rotation period, especially across a single rotation window.

Reading: Rajpaul et al. — joint activity processes, arXiv:1506.07304v1 · Haywood et al. — CoRoT-7, arXiv:1407.1044v1

## Differentiate both arguments, with their signs

Define the logarithmic derivative as the expression below. Differentiating with respect to the second time reverses its sign because the lag decreases. Differentiating once in each argument then supplies the derivative–derivative block. The unequal-time velocity–calcium blocks are transposes, not identical copies.

$$
h=-\frac{\tau}{\ell_e^2}-\frac{\pi\sin(2\pi\tau/P_r)}{2P_r\ell_p^2},\quad \partial_tk=hk,\quad \partial_{t'}k=-hk
$$

At equal times the first derivative is zero. This limit alone cannot detect an incorrect cross-covariance sign; our independent finite-difference check also uses unequal times.

$$
h'=-\ell_e^{-2}-\frac{\pi^2\cos(2\pi\tau/P_r)}{P_r^2\ell_p^2},\qquad \partial_t\partial_{t'}k=-(h'+h^2)k
$$

The velocity–calcium block is $A(ak+b\partial_tk)$; its transpose uses the second-time derivative. The stationary velocity block is $a^2k+b^2\partial_t\partial_{t'}k$, since the mixed first-derivative terms cancel.

Add quoted measurement variances and a separate positive jitter variance for each channel. The full 142-by-142 covariance includes all 71 velocities and all 71 calcium measurements. BIS and FWHM remain available as ancillary data, but their missing formal errors are not fabricated.

Reading: Rajpaul et al. — joint activity processes, arXiv:1506.07304v1 · Rasmussen & Williams — Gaussian Processes for Machine Learning, Chapter 2

## Integrate the linear coefficients instead of fixing them

For fixed nonlinear hyperparameters, write the orbital sines, cosines and channel offsets as a design matrix. Give their coefficients a proper zero-mean Gaussian prior. Completing the square gives a conditional covariance and mean; integrating the coefficients gives a normalized marginal density for the hyperparameters.

$$
V=(\Lambda^{-1}+X^{\mathsf T}C^{-1}X)^{-1},\qquad \mu=VX^{\mathsf T}C^{-1}y,\qquad y\sim\mathcal N(0,C+X\Lambda X^{\mathsf T})
$$

The normalizing determinant matters when weighting different hyperparameters or comparing models. A fitted coefficient vector alone is not this distribution.

The independent sine and cosine priors have standard deviation 10 metres per second in the default replay. They imply a Rayleigh prior for nonnegative amplitude. The experiment with standard deviation 3 changes that prior explicitly. The short period is fixed at 0.85359165 days; the second period is uniform from 3.3 to 4.1 days. These are conditional orbital hypotheses, not a blind search over all periods and planet counts.

Reading: Rasmussen & Williams — Gaussian Processes for Machine Learning, Chapter 2 · Rajpaul et al. — joint activity processes, arXiv:1506.07304v1

## A small example where the prior does visible work

Suppose one measured sine coefficient is 10 with uncertainty 1, and both a planet coefficient and an activity coefficient multiply exactly that sine. Independent priors give standard deviations 5 and 10. The variance of their sum plus noise is 126. Gaussian conditioning assigns a mean of $25(10)/126\simeq1.98$ to the planet and $100(10)/126\simeq7.94$ to activity. The planet’s standard deviation remains about 4.48, with a strong negative covariance between the two contributions.

If an independent activity observation is zero with uncertainty 1, its posterior activity variance becomes $100/101$. The same velocity now gives a planet mean about 9.26 and standard deviation about 1.36. A second channel has changed the allocation because it contains independent information. It has not supplied a universal correction factor.

The public injection experiment repeats this idea on the actual observing times with wholly synthetic values. A coherent single-harmonic Gaussian process is deliberately used there, separate from the full quasi-periodic real-data fit. Near the rotation period, changing the activity prior can absorb or release orbital amplitude; a constraining synthetic activity channel helps. Known truth makes that test interpretable.

Reading: Rasmussen & Williams — Gaussian Processes for Machine Learning, Chapter 2 · Rajpaul et al. — joint activity processes, arXiv:1506.07304v1

## The nonlinear mixture still needs checking

We sample the nonlinear prior through a defensive proposal with a 15-percent full-prior component and several adaptive Student components. The exact likelihood times prior divided by the full proposal density supplies each weight. Final draws are independent of the discarded adaptation pilots. Weighted conditional Gaussian means and full covariances combine through total expectation and total covariance, preserving cross-parameter correlations.

The initial 512 prior nodes had effective counts near one. They failed. The final joint run has an effective count about 6409 out of 32768, with maximum normalized weight about 0.00235. Independent seeds and 65536 draws give similar amplitude intervals. Gaussian and separated three-mode targets test normalization and mode coverage independently. These diagnostics support this calculation within its declared priors; they are not a proof that every physically plausible activity model has been explored.

Reading: Rasmussen & Williams — Gaussian Processes for Machine Learning, Chapter 2 · Haywood et al. — CoRoT-7, arXiv:1407.1044v1

## Exercises and explanations

1. Why is a best-fitting activity curve followed by a planet fit likely to give intervals that are too narrow?

   Read the explanation

   It conditions on one activity choice and discards its covariance with the orbital coefficients. Competing allocations can fit similarly well. Integrating or sampling that uncertainty retains the wider range of allowed orbital contributions.

2. The highest-likelihood rotation period is 24 days. Does that mean the posterior assigns nearly all its probability there?

   Read the explanation

   No. Posterior mass also depends on prior density and the width and volume of surrounding parameter space. A sharp likelihood peak may hold less mass than a broad region. Proper weighted samples measure that probability mass.

## Try the prediction

### [Find a contribution the brightness cannot remove](https://sandboxphysics.com/labs/binary-star-mass/)

1. In the Lab choose a dark region and increase the convective shift while leaving the brightness controls fixed.
2. Compare the unchanged photometric response with the altered velocity. Use this difference to motivate a shared-process model with more than one response term.

[Previous: Follow a spot’s missing light](https://sandboxphysics.com/stories/rv-activity/a-spots-missing-light/) [Next: Replay the HARPS campaign](https://sandboxphysics.com/stories/rv-activity/replay-the-harps-campaign/)

## Sources and calculation scope

1. [Haywood et al. — CoRoT-7, arXiv:1407.1044v1](https://arxiv.org/pdf/1407.1044v1)

   3 July 2014 version. Sections 2–3 and 4.2, Equations 1–12 and Table A1. All 71 HARPS2012 numerical rows are retained; the tutorial does not reproduce the full contemporaneous-photometry analysis.

2. [Rajpaul et al. — joint activity processes, arXiv:1506.07304v1](https://arxiv.org/html/1506.07304v1)

   24 June 2015 version. Sections 3.1–3.4 and 4.1–4.2, Figures 3–4, Appendix A.2. Derivative covariance signs follow a lag equal to first time minus second time; kernel-width normalizations must be kept with their equations.

3. [Rasmussen & Williams — Gaussian Processes for Machine Learning, Chapter 2](https://gaussianprocess.org/gpml/chapters/RW2.pdf)

   Authors’ 2006 Chapter 2, Sections 2.1–2.2 and 2.7: Gaussian conditioning, normalized marginal densities and linear basis functions. The importance sampler and surface quadrature are independently authored here.
