Let , and write for the standard normal distribution density. For importance sampling, choose the proposal density , namely the uniform distribution on the target interval. Its importance sampling weight is
For iid uniform draws ,
is an unbiased estimator of the target mean, since its expectation integrates . If one chooses not to evaluate , the self-normalized importance sampling alternative has statistical consistency, but generally is not an unbiased estimator.
Alternatively, draw independent random variables with the standard normal distribution, let and , and use
Conditionally on , the retained draws are iid from the truncated normal distribution, so their average is an unbiased estimator with variance , where is its variance. If the ratio is undefined; one can continue drawing until a prescribed number of retained observations is obtained.
Here importance sampling uses every draw inside the interval, whereas only of the normal proposals are retained. The advantage can also be quantified. Integration using gives
For uniform importance sampling,
For the retained-draw ratio with a fixed total proposal budget, its asymptotic variance coefficient is . Thus this importance choice has substantially smaller error for the same proposal count; it also avoids wasting about two thirds of the standard normal distribution draws. This comparison is specific to this well-matched importance sampling proposal; arbitrary proposal choices do not share this guarantee.
Draw independent uniformly on , and set
This is the Box-Muller transform. The endpoint has probability zero; an implementation should avoid evaluating its logarithm.
For , , so has density . It is independent of the angle, which has a uniform distribution on , and their joint density is . Transforming to Cartesian coordinates divides by the polar-coordinate Jacobian , yielding
Thus the outputs are independent random variables with the standard normal distribution, proving the algorithm.
Put and assume . Then
Thus generally has a periodic mean, and generally has a periodic variance. The edge cases allowed by matter: is stationary when , because the mean is then constant, and is stationary for or . In the latter case multiplying iid centered Gaussian white noise by leaves its iid distribution unchanged. For every , but , so is nonstationary. For , is nonstationary because is not constant.
Use the seasonal difference operator . Since ,
This is a stationary moving-average model of iid Gaussian white noise. Its covariance is at lag , at lags , and zero otherwise.
For the variance-modulated process the same operation gives
Its variance is and its covariance at lag is . Therefore it remains nonstationary for , and the operation doubles the marginal variance at nonzero seasons. Seasonal differencing does not remove periodic variance: it removes a periodic mean, but the periodic variance generally remains. Practical alternatives are a periodic model or seasonal variance standardization; at seasons with the observations are deterministically zero, so division by is not possible there. For the already stationary special cases , filtering preserves stationarity.
A periodically correlated process with period has its mean and two-time covariance unchanged when both times are shifted by . For , the mean is zero and
Hence is a periodically correlated process. Its covariance period can be smaller than : when is even, , so is already a covariance period.
A nonstationary process has a statistical law that changes with the time origin. In the weak sense, this includes a time-dependent mean or variance, or a covariance that depends on the two times separately rather than only on their lag. A strictly stationary process requires invariance of every finite-dimensional distribution under a common time shift.
In the preceding plots, series suggests a stochastic trend or changing level, and series suggests a deterministic seasonal mean. These are the intended nonstationary examples. A plot alone cannot prove either conclusion: in particular, a stationary random-phase sinusoid can have a seasonal-looking trace and an oscillatory ACF. The interpretation of series as nonstationary concerns a seasonal mean tied to calendar time.
Three standard responses are to remove a fitted deterministic trend or seasonal mean; to use regular or seasonal differencing for an appropriate trend or seasonal component; and to stabilize a changing variance by a transformation or explicit seasonal scale model. For example, logarithms or a Box–Cox transformation can address level-dependent variance. The operation should match the source of nonstationarity; differencing a varying variance does not generally make it stationary.
The labels in PDF Figure 2 match as follows:
Series has a wandering level and an overall upward drift. Its empirical autocorrelation function stays close to and declines very slowly, matching panel ; this is characteristic of a trend or a record from a unit-root autoregressive process. Such an empirical ACF is not a population stationary ACF if the underlying model is a random walk.
Series shows relatively smooth runs of adjacent observations on the same side of its level. Positive short-lag dependence emphasizes low frequencies, matching the decreasing spectrum .
Series is rougher, with much more rapid fluctuation. Negative short-lag dependence emphasizes high frequencies, matching the increasing spectrum . A negative-coefficient AR(1), for example, has this type of spectrum; the figure does not uniquely identify its exact order or parameters.
Series has conspicuous seasonality. Its autocorrelation function should alternate between positive peaks at full seasonal periods and negative troughs between them, matching . Here “characteristic function” is used descriptively for an ACF or spectrum, rather than for the probability-theoretic characteristic function of a random variable.
With angular frequency , the periodogram is
At Fourier frequencies it is the squared modulus of the normalized discrete Fourier transform. If a nonzero mean is unknown, subtract the sample mean first.
For a zero-mean stationary process, expanding the square gives
Under absolute summability of the covariances this converges to the spectral density of a stationary process. Thus the periodogram is generally biased at finite , but asymptotically unbiased under this short-memory time series condition.
It is nevertheless not a pointwise estimator with statistical consistency unless it is smoothed. For Gaussian white noise, at a nonzero Fourier frequency other than the Nyquist frequency, the real and imaginary Fourier components are independent normal variables. Exactly,
where . The variance does not decrease with . Under usual short-memory time series assumptions the same exponential limit is asymptotic for general processes. Averaging nearby frequencies or using a lag-window estimator reduces variance; a frequency bandwidth tending to zero while times that bandwidth tends to infinity can give statistical consistency. The raw plot remains useful for detecting strong periodic peaks, but increasing the record length alone does not remove its pointwise noise.
For a causal autoregressive model of order , the population partial autocorrelation function cuts off after lag , whereas the autocorrelation function generally decays. For an invertible moving-average model of order , the autocorrelation function cuts off after lag , whereas the partial correlation coefficients generally decay. For a mixed autoregressive moving-average model, both generally decay. Exponential decay may alternate in sign or show damped oscillations. Sample correlation coefficients only approximate these patterns, so isolated crossings of the significance bands are not exact order tests.
In PDF Figure 1, the autocorrelation function alternates sign, with a large negative lag-one correlation coefficient and geometrically decreasing magnitude. The partial autocorrelation function has essentially one substantial spike, negative at lag one and about ; later values mostly lie within the displayed bands. Thus a stationary AR(1) with a negative coefficient is the natural first model, with initially near . The trace fluctuates around an approximately constant mean and shows no evident deterministic trend.
Fit that model, compare nearby low-order alternatives using likelihood function and an Akaike information criterion or Bayesian information criterion, and inspect the residual autocorrelation function and residual variance. A few small later PACF spikes are expected in a plot with many lags. The roughly white noise bands are a guide, rather than simultaneous guarantees for every lag.
The sign alternation also suggests concentration of spectral power near the high-frequency end: the AR(1) denominator is smallest near when . From estimated and lag-one correlation coefficient one can estimate innovation variance as . The persistence parameter controls the decay rate and long-run variance of a stationary process. These plots do not establish a normal distribution, independence, or the absence of nonlinear dependence; correlation coefficients of squared residuals can provide a separate variance diagnostic.
Use the allowed ratio-of-expectations approximation where . The unconditional numerator and denominator from part (b) give
The common censoring survivor function cancels in this approximation. By differentiating the logarithm, its value is the population integrated hazard:
This is not generally the arithmetic mean of the ; it is the cumulative hazard function of the population mixture from part (a). The cancellation requires a common independent censoring law and adequate observation of the time range.
The approximation establishes approximate unbiasedness, not exact finite-sample unbiasedness. For a direct counterexample, take one uncensored individual with exponential distribution of rate . The Nelson–Aalen estimator is then , whose expectation is , whereas . Thus it is not an unbiased estimator in general.
More explicitly, for independent individuals with a common event hazard , the exact expected estimator is
This exhibits finite-sample bias of Nelson–Aalen estimation and dependence on when empty risk sets are possible. In a heterogeneous population, replacing the random ratios by ratios of their means introduces an additional approximation. On adequately observed intervals with large risk sets, the population-mixture expression is the appropriate large-sample target.
Let and be the total observed counting process and size of the risk set. When the individual cumulative hazard functions are all , summing the conditional intensity equations gives
Replace the expected increment by its observed value and divide by the predictable risk set size. Thus the Nelson–Aalen estimator in integral form is
with the integrand defined as zero when . This is an integral against the step counting process, so each event time contributes its event count divided by the risk set just before that time. The Nelson–Aalen estimator estimates integrated hazard over times with observable risk; it does not supply information after observation has ended.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact