COMP 521 · DATA AND INFERENCE
How do imperfect measurements constrain a physical quantity?
Anna Rosen · San Diego State University
THE ROAD THROUGH THE FOUNDATIONS
Light and models: What produces a transit and what does a detector measure?
Probability: How do repeated measurements vary, and how can measurements be related?
Geometry: How do vectors and matrices organize measurements and transformations?
Use right for the main sequence and down for additional worked details.
THE SCIENTIFIC QUESTION
A transit occurs when a planet passes in front of its star, blocking some of its light. The curve shows brightness relative to the star’s usual level.
Uniform star; central transit; no limb darkening.
LIGHT FROM STAR TO DETECTOR
Flux is the energy arriving per unit time per unit collecting area, in a specified wavelength band.
A detector records counts from the light collected during an exposure.
MEASURE BRIGHTNESS OVER TIME
After calibration, compare brightness at each time with the out-of-transit brightness:
This normalized flux is dimensionless. Outside transit it is near 1; a transit makes a dip.
The measured counts depend on the telescope, detector, exposure time, and background as well as the incoming light.
AN IDEALIZED FORWARD MODEL
For the fully overlapping planet in this model, the blocked fraction of a uniformly bright stellar disk is
The normalized flux falls from 1 to 0.99. Real stars have limb darkening, and real light curves include additional variation and measurement error.
SIGNAL AND VARIATION
Photon counting: the number of detected photons fluctuates between exposures.
Background and detector noise: sky light and electronic readout add variation.
Instrument and star: changing sensitivity and stellar variability can add patterns to the light curve.
Some variation is random; other patterns can be correlated in time or reflect real stellar behavior. Their size matters when deciding which transit models fit the data.
FROM A PHYSICAL EVENT TO DATA
Each point is a flux measurement at a time.
A transit produces a dip; a forward model predicts its shape. The scatter and remaining patterns need explanation too.
QUESTION → PREDICTION → COMPARISON
A forward model predicts measurements from physical parameters.
yi is observed flux; m is the predicted flux; ϵi is their discrepancy.
Inference compares predictions with observations.
PHYSICAL PARAMETERS → LIGHT CURVE
Choose the star, planet, orbit, and observation times. The model predicts a flux at each time.
For the uniform-star transit,
The radius ratio determines the full-transit depth.
THE UNIFORM-STAR MODEL
p=Rp/R⋆ is the radius ratio; z=d/R⋆ is the projected separation in stellar radii.
As the projected separation changes, the overlap between the planet and stellar disk changes.
THE UNIFORM-STAR MODEL
For a smaller planet in front of a uniform star:
The normalized flux is the fraction of the stellar disk that remains visible.
CIRCULAR, EDGE-ON ORBIT
For orbital radius a and period P, near a primary transit with mid-transit at t=0:
Time gives the planet’s projected position. The overlapping area gives the predicted brightness.
The projected separation alone does not tell us whether the planet is in front of or behind the star.
PROJECT 2 · LIMB DARKENING
The center of a star’s disk can appear brighter than its edge. A planet of the same size blocks more light where the surface is brighter.
The transit shape therefore depends on both the planet’s path and the star’s brightness pattern.
LIMB DARKENING
In the linear limb-darkening model, r is distance from the disk center in units of R⋆:
I0 is the central intensity; u sets the strength of limb darkening. For u>0, the edge is dimmer.
INTEGRATE ACROSS THE STELLAR DISK
For each annulus, c(r,z) is the fraction covered by the planet. Add the blocked contribution from all annuli:
The normalized model is f(z)=1−ΔF(z). When u=0, it recovers the uniform-disk model.
TIME → ORBIT → LIGHT CURVE
For eccentricity e and period P, take t=0 at periastron. The mean anomaly M advances uniformly; solve Kepler’s equation for eccentric anomaly E:
Then compute the orbital position and projected separation z(t), check that the planet is in front, and evaluate the transit model.
Changing the orbit changes when and how the planet crosses the star. Changing the stellar brightness model changes how much light it blocks.
LIGHT CURVE → PARAMETER ESTIMATES
Which parameter values reproduce the observed light curve?
Try parameters, calculate predictions, and compare them with the data.
Different combinations can produce similar curves. Uncertainty determines how precisely the data distinguish them.
PREDICTION MEETS KEPLER DATA
The projects built a path from physical parameters to predicted brightness:
With observations, compare the prediction at each observation time to the measured flux:
The residuals tell us where the model and the light curve disagree. Project 5 brings this modeling idea to Kepler photometry.
A FIRST INVERSE PROBLEM
Before fitting a full transit curve, use a fixed-shape model to see how fitting works. Take a baseline of 1 and a fixed transit template:
Ti=0 outside transit; Ti=1 inside. The unknown parameter δ is the depth.
For δ=0.01, the model predicts (1.00,0.99,0.99,1.00). Press down for the worked fit.
FOUR OBSERVATIONS
The data are (1.00,0.98,0.99,1.00).
Each curve uses the same baseline and timing. Only the depth changes.
Which depth best matches the two in-transit measurements?
DATA MINUS MODEL
For each observation, subtract the model:
With equal weights, compare candidate depths:
A fit minimizes this sum.
MINIMIZE THE RESIDUALS
A DEPTH OF 1.5%
The in-transit prediction is 0.985.
Residuals: -0.005 and +0.005.
The fitted depth summarizes the dip. The residuals show what remains around the model.
FROM A FIT TO A PHYSICAL QUANTITY
For a uniform star and a fully overlapping planet:
The light curve constrains a radius ratio through the forward model. To find Rp itself, we also need R⋆.
Here we held the transit timing, shape, and baseline fixed. Estimating them changes the inverse problem.
PART I
If we repeated a measurement under the same conditions, how would its outcomes vary?
A probability distribution describes that variation.
RANDOM VARIABLES
A random variable Y represents possible measurement outcomes.
For a continuous quantity:
Probability is area over an interval.
The density at a single value is not the probability of that exact value.
AVERAGE OVER POSSIBLE OUTCOMES
The expectation of a random quantity is its probability-weighted average over possible outcomes.
For discrete outcomes yk with probabilities P(Y=yk):
It is a property of the probability model. With many independent repetitions from the same distribution, the sample average approaches it when the mean is finite.
WEIGHT EACH OUTCOME BY ITS PROBABILITY
Suppose a repeat measurement of normalized brightness Y is 0.98 with probability 1/4 and 1.00 with probability 3/4:
Across repeated measurements, the average approaches 0.995. In this example, neither individual outcome equals the expectation.
THE SAME IDEA FOR ANY QUANTITY
To average a function g(Y), weight each value of the function by the same outcome probabilities:
For a continuous variable with density p(y), replace the sum with an integral:
The expectation exists when the relevant weighted sum or integral is finite.
SUMMARIZE A DISTRIBUTION
Mean μ: center of the distribution.
Standard deviation σ: scale of the spread, in the same units as Y.
EXPECTATION FOR A CONTINUOUS VARIABLE
Each possible value contributes according to its probability density. The density integrates to one; the mean is a property of the distribution.
The same expectation rule applies to other functions, including squared deviations from the mean.
SPREAD ABOUT THE MEAN
The variance is the density-weighted mean squared deviation. The standard deviation is in the original units.
CALCULATING MEAN AND SPREAD
Let p(y)=1/2 for 0≤y≤2, and zero elsewhere. Then
DISTRIBUTION AND DATA
Given measurements y1,…,yn, their sample mean is
yˉ is computed from the observed sample. μ is the mean of the underlying distribution we are trying to learn about.
For a changing star or changing transit signal, separate measurements may have different expected values. A common mean is a model assumption.
DISTRIBUTION AND DATA
For n>1 observed measurements with sample mean yˉ:
The sample mean is estimated from the same data. The n−1 correction makes s2 unbiased for independent, identically distributed measurements with finite variance.
WHY REPEATED MEASUREMENTS HELP
If independent measurements have a common mean and variance σ2:
σ: spread of individual outcomes.
σ/n: standard error of the mean across repeated samples.
A shared calibration bias need not average away.
DEPENDENCE
Events A and B are independent if P(A,B)=P(A)P(B).
A shared instrumental drift can make nearby errors dependent.
For random variables, independence means the joint distribution factors into the individual distributions.
DEPENDENCE AND LINEAR ASSOCIATION
Positive covariance: the average product of deviations is positive.
Negative covariance: the average product is negative.
Covariance carries the product of the variables’ units.
NORMALIZE BY THE SPREADS
Correlation has no units and ranges from -1 to 1 when both standard deviations are nonzero.
The sign and magnitude describe the direction and strength of the linear association.
DIRECTION AND STRENGTH
Near +1
Strong positive linear association.
Near 0
Little linear association.
Near -1
Strong negative linear association.
Correlation measures association, not causation. A nonlinear dependence can have zero correlation.
SAMPLE COVARIANCE AND CORRELATION
Each product uses the X and Y deviations from the same observation.
Divide by the two sample standard deviations to remove units and compare linear associations on the same scale.
FROM PAIRED DEVIATIONS TO A NUMBER
xˉ=yˉ=0.
∑xiyi=4, ∑xi2=5, ∑yi2=4.
The positive value matches the upward pattern.
KEEP THE SCALE AND THE ASSOCIATION DISTINCT
If σX=2, σY=3, and Cov(X,Y)=3, then
Covariance carries the product of the variables’ units. Correlation divides out their spreads and has no units.
COVARIANCE IS NOT ALL DEPENDENCE
Press down for the worked counterexample.
OPTIONAL DETAIL · A COMPLETE COUNTEREXAMPLE
Let X be -1, 0, or 1, each with probability 1/3. Let Z=X2.
Yet knowing X=0 tells us Z=0 with certainty, while P(Z=0)=1/3 without that information.
Independence implies zero covariance when the relevant moments exist; the converse fails.
UNCERTAINTY IN A SUM
Let Z=X+Y, and write ΔX=X−μX and ΔY=Y−μY.
Then Z−E[Z]=ΔX+ΔY. Its variance starts with the square
The two deviations appear together because the result depends on both quantities.
THE MIXING TERM
The cross term is the average product of the deviations.
THE CROSS TERM CHANGES SIGN
Positive shared variation reinforces the sum and partly cancels in the difference.
TWO CORRELATED QUANTITIES
With σX=2, σY=3, and ρ=0.5:
At zero covariance, both variances would be 4+9=13.
SUM VS. DIFFERENCE
APPLY THE SUM FORMULA
The factor 1/4 comes from squaring the coefficient 1/2.
The covariance term tells us how the two measurements move together.
TWO EQUALLY PRECISE MEASUREMENTS
For common variance σ2 and correlation ρ:
ρ=0: variance is σ2/2.
ρ>0: shared variation reduces the gain in precision.
A shared bias shifts the mean; correlation describes shared variation.
A PROBABILITY MODEL
The center is μ; σ sets the spread.
Many small contributions can produce an approximately Gaussian error under suitable conditions.
BUILDING TOWARD THE CLT
Imagine an outcome that is 1 with probability 1/2 and 0 with probability 1/2.
One outcome has only two possible values. Its mean is 1/2, and its variance is (1/2)(1/2)=1/4.
Take 100 independent outcomes. Their sample mean is the fraction of 1s.
DISTRIBUTIONS OF SAMPLE MEANS
Each experiment supplies one mean. Larger samples concentrate those means around 0.5.
THE DISTRIBUTION OF A SAMPLE MEAN
Each experiment produces one fraction.
Across repeated experiments, those fractions have mean 0.5 and standard deviation
WHAT APPROACHES A GAUSSIAN?
For independent, identically distributed variables with finite mean μ and finite nonzero variance σ2:
The distribution of the standardized mean approaches a Gaussian. Individual outcomes do not become Gaussian.
WHY A GAUSSIAN CAN BE USEFUL
A recorded measurement can combine many small contributions to its error. When those contributions satisfy appropriate independence and balance conditions, their sum can be approximately Gaussian.
The resulting distribution describes possible errors in a measurement. A shared instrumental drift or a few dominant effects can change that distribution.
CONNECT THE MODEL TO THE MEASUREMENTS
Strong dependence changes how observations combine.
Heavy tails or a few dominant effects can make the approximation poor.
A systematic bias can remain even when random errors average down.
Selection changes which measurements we see.
The accuracy of the approximation depends on the measurement process and sample size.
WHY SHOULD UNCERTAINTY AFFECT A FIT?
0.980±0.010 and 1.000±0.020.
Assume independent, unbiased Gaussian errors, known σi, and one constant brightness.
The ordinary mean is 0.990. Press down for the likelihood and weighted fit.
A MODEL FOR MEASUREMENT VARIATION
With independent Gaussian errors and known σi:
Each measurement contributes one factor.
TAKE THE LOGARITHM
The constant does not depend on μ because the uncertainties σi are fixed.
Maximizing likelihood minimizes the weighted squared residuals.
FROM A NOISE MODEL TO AN OBJECTIVE
With independent Gaussian errors, maximizing the likelihood is equivalent to minimizing
Differentiating and setting dQ/dμ=0 gives
Each residual is divided by its uncertainty; the objective sums the squared ratios.
INVERSE-VARIANCE WEIGHTING
The first measurement has one-quarter the variance and four times the weight:
PART II
Vectors and matrices organize the quantities we measure and the operations we perform on them.
ONE STAR, MANY TIMES
A light curve contains measurements at ordered times:
A prediction and a residual have one entry for each observation.
The order, units, and correspondence between time and flux matter.
A DIFFERENT DATASET
Two illustrative stars, each measured in two normalized flux bands:
Rows: stars. First star’s feature vector: (0.9,1.1).
Columns: band A and band B. Each is a feature.
Here there are two feature dimensions, not two spatial dimensions.
HOW A MATRIX COMBINES FEATURES
Each row supplies the weights for one output.
A RULE THAT MAPS VECTORS TO VECTORS
The columns of A tell us where the input basis directions go. Matrix multiplication combines those directions to produce the output.
Linear transformations preserve addition and scaling:
A matrix can scale, rotate, combine, or project coordinates. The physical model itself need not be linear.
VARIANCES AND COVARIANCES
For the same pair, Var(X)=4, Var(Y)=9, and Cov(X,Y)=3:
The diagonal entries are variances; off-diagonal entries are the mixing terms.
UNCERTAINTY OF A LINEAR COMBINATION
For Z=aX+bY and a=(a,b)T:
The same expression is compactly written
Multiplying aTΣa produces both variance terms and the covariance cross term.
TRANSFORMING A RANDOM VECTOR
If z=Ax and x has covariance Σ, the covariance of z is
Each output is a combination of inputs. The multiplication carries their variances and covariances into the output.
THE CROSS TERMS REAPPEAR
Choose z=(X+Y,X−Y)T. Then
The output variances, 19 and 7, agree with the earlier sum-and-difference calculation.
AVERAGE TWO BANDS
Both output coordinates equal the average. The result lies on the equal-band line.
EIGENVECTORS AND EIGENVALUES
A transformation usually changes a vector’s direction as well as its length. An eigenvector stays on the same line: the matrix can stretch, shrink, or reverse it.
The eigenvalue λ gives the scale factor. For a covariance matrix, eigenvectors give the principal directions and eigenvalues give the variances along them.
AN UNCERTAINTY ELLIPSE
For deviations Δx from the mean, the ellipse shows ΔxTΣ−1Δx=1.
Its tilt shows the positive covariance: deviations along the longer direction change together.
The principal axes follow the eigenvectors. Their lengths are the square roots of the corresponding eigenvalues.
THE GEOMETRY OF A REPRESENTATION
Original = projection + difference.
The discarded difference might contain useful color information.
A CHOICE ABOUT INFORMATION
A spectrum may have thousands of wavelength features. A smaller representation can make patterns easier to visualize, store, and model.
But compression discards information. A low-variance feature can carry a rare and scientifically important signal.
Later: PCA finds directions of large variance in centered data; SVD provides a way to compute them. Scaling and the scientific question matter.
COMPARING VECTORS
The dot product combines corresponding entries and describes alignment together with vector lengths.
Suppose a model predicts ax: a known direction x=0, with amplitude a to estimate.
A SIMPLE LEAST-SQUARES MODEL
Choose a to minimize the squared residual:
This unweighted model has no separate baseline.
DATA = FIT + RESIDUAL
Let x=(1,2) and y=(2,3):
The residual is (0.4,−0.2) and its dot product with x is zero. The fitted vector is the closest point on the model line.
THURSDAY
Inspect measurements, units, flags, gaps, and uncertainties.
Choose a forward model and calculate residuals.
Use a noise model to weight those residuals.
Examine what the fit leaves unexplained.
Kepler photometry will provide the application. Today also includes Project 4 questions and completion time.