  We compare four different methods that can be used to analyze the type Ia
supernovae (SnIa) data, ie to use piecewise-constant functions in terms of: the
dark energy equation of state $w(z)$, the deceleration parameter $q(z)$, the
Hubble parameter $H(z)$ and finally the luminosity distance $d_L$. These four
quantities cover all aspects of the accelerating Universe, ie the
phenomenological properties of dark energy, the expansion rate (first and
second derivatives) of the Universe and the observations themselves. For the
first two cases we also perform principal component analysis (PCA) so as to
decorrelate the parameters, while for the last two cases we use novel analytic
expressions to find the best-fit parameters. In order to test the methods we
create mock SnIa data (2000 points, uniform in redshift $z\in[0,1.5]$) for
three fiducial cosmologies: the cosmological constant model ($\Lambda$CDM), a
linear expansion of the dark energy equation of state parameter
$w(a)=w_0+w_a(1-a)$ and the Hu-Sawicki $f(R)$ model. We find that if we focus
on the two mainstream approaches for the PCA, i.e. $w(z)$ and $q(z)$, then the
best piecewise-constant scheme is always $w(z)$. Finally, to our knowledge the
piecewise-constant method for $H(z)$ is new in the literature, while for the
rest three methods we present several new analytic expressions.
