# Pulsars and neutron stars/Statistical and analysis methods for pulsar research

## Introduction

Pulsar searching and timing requires the analysis of time series of data. In this section we present commonly used equations, algorithms, numerical methods, methodologies and routines.

## Basic time series analysis

We assume that we have a time series of $N$ samples. Each sample, $j$ , has a time $t_{j}$ and its value $y_{j}$ . The mean of the values (note that we are starting the element counter from zero):

${\bar {y_{j}}}={\frac {1}{N}}\sum _{j=0}^{N-1}y_{j}$ The standard deviation represents the amount of variation in a data set.

$\sigma ={\sqrt {{\frac {1}{N}}\sum _{j=0}^{N-1}(y_{i}-{\bar {y}})^{2}}}$ This can also be calculated using:

$\sigma ={\sqrt {\left({\frac {1}{N}}\sum _{j=0}^{N-1}x_{i}^{2}\right)-\left({\frac {1}{N}}\sum _{j=0}^{N-1}y_{i}\right)^{2}}}$ ## Distributions

### $\chi ^{2}$ -distribution

The $\chi ^{2}$ -distribution is defined by the number of degrees of freedom, $k$ . The mean of the distribution is $k$ and the variance $2k$ . For a power-spectrum estimate the distribution of each point is given by a $\chi ^{2}$ -distribution with 2 degrees-of-freedom (corresponding to an exponential distribution with the rate parameter $\lambda =0.5$ ):

$p(x)={\frac {1}{2}}e^{-x/2}.$ The mean of this is 2 and the variance is 4. It is common to normalise the distribution so that the mean=1.The normalised chisquare(2) has $p(x)=e^{-x}$ which has a mean=1 and variance=1. The 95% confidence limits are 0.025 and 3.67.

## Fourier transforms and power spectra

### The Discrete Fourier Transform (DFT)

For a regularly sampled time series of values $y_{j}$ of N data points, the discrete Fourier transform (DFT) is:

$F_{k}=\sum _{j=0}^{N-1}y_{j}\exp \left(-2\pi {\sqrt {-1}}jk/N\right)$ (Note that this is the definition that is used in the forward transform for the fftw libraries). Note that the $F_{k}$ values are complex:

$F_{k}=R_{k}+iI_{k}.$ Note that for pulsar searching it is common to normalise all the Fourier coefficients, $F_{k}$ by the factor (see Ransom et al. 2012)

$\gamma =(N{\bar {y_{j}^{2}}})^{1/2}$ 