Interactive demo · Nonparametric Statistical Inference · Chapter 8

Orthogonal series density estimation with react

Rescale the data to (0, 1). The cosine coefficients of the density are expectations, θj = E φj(X), so they are estimated by sample means Zj with variances σj² that can be estimated too. Keeping J terms costs Σj ≤ J σ̂j² in variance and leaves Σj > J (Zj² − σ̂j²)+ of bias: minimise the sum. The series can dip below zero; "surgery" removes the negative part and rescales to total mass one. Here the data come from ½N(0, 1) + ½N(μ, 1).

Separation μ

Sample size n

Number of terms J

Try these

The data are rescaled to (a, b) = (min − 0.1·range, max + 0.1·range). Zj = n−1Σφj(Ui), σ̂j² = n−2Σ(φj(Ui) − Zj)² (8.28)–(8.30). Kernel estimates: Gaussian kernel with h from least squares cross-validation (60 values from 0.05 to 2) and from the normal reference rule 1.06 s n−1/5. ISE = ∫(f̂ − f)² on 801 points.

In the lecture notes