text:
\section{Introduction}
\label{sec:Introduction}

The study of linear statistics of eigenvalues of random matrices has played a major role for the applications of random matrix theory to physical problems, like quantum transport \cite{Bee97,KhoSavSom09,MelKum04,VivMajBoh08,VivMajBoh10}, quantum entanglement \cite{PFPPS10,NadMajVer10,NadMajVer11}, etc, as it was emphasized in our recent papers \cite{GraMajTex17,GraTex16b}.
Whereas previous work has considered \textit{unrestricted} sums of the form $L=\sum_{i=1}^Nf(\lambda_i)$, where $\{\lambda_1,\cdots,\lambda_N\}$ is the spectrum of eigenvalues of a random matrix, the question of \textit{truncated} linear statistics (TLS) of the form
\begin{equation}
  \label{eq:firstEquationTLS}
   \tilde{L}=\sum_{i=1}^p f(\lambda_i)
   \hspace{0.5cm}\mbox{with}\hspace{0.5cm}
   p<N
\end{equation}
was recently raised in our previous paper \cite{GraMajTex17}.
There, we have considered the case where the eigenvalues contributing to the partial sum are further constrained to be the $p$ largest (or smallest) ones,
which corresponds to interpolating between two well studied types of problems~:
for $p=N$,  the statistical analysis of the linear statistics $L=\sum_{i=1}^Nf(\lambda_i)$ \cite{Bee97,CunFacViv16,GraTex15,GraTex16b,KhoSavSom09,NadMajVer10,NadMajVer11,TexMaj13,VivMajBoh08,VivMajBoh10} (and many other references),
and for $p=1$, the study of the distribution of the largest (or smallest) eigenvalue \cite{BorEynMajNad11,DeaMaj06,DeaMaj08,MajVer09,MajSchVilViv13,MajSch14,TraWid94,TraWid96,VivMajBoh07}.

The aim of the present paper is to analyse the statistical properties of TLS \eqref{eq:firstEquationTLS} \textit{in the absence of further restriction} concerning the ordering of the $p<N$ eigenvalues~;
we will see that lifting this restriction has strong implications on the analysis and the results.

A related question was introduced by Bohigas and Pato \cite{BohPat06} who studied the effect of removing  randomly chosen eigenvalues in an invariant matrix ensemble, leading to consider a fraction of the initial eigenvalues.
Initially motivated to model the transition from the random matrix spectrum (correlated eigenvalues) to the Poisson spectrum (uncorrelated eigenvalues), this question has shown a renewed interest recently, under the name of ``thinned ensembles'' \cite{BerDui16,ChaCla16,Lam16}.
Here we study the linear statistics in an ensemble, which is similar to, but different from the thinned ensembles.
The relation between the two ensembles is discussed below, see Eqs.~(\ref{eq:DistribLambdaN},\ref{eq:RelationWithThinned},\ref{eq:ThinnedEnsemble}).

For convenience, we rescale the TLS as
\begin{equation}
	s = N^{-\eta} \sum_{i=1}^{p} f(\lambda_i)
	\:,
	\label{eq:defTrlinstat0}
\end{equation}
where the exponent $\eta$ is chosen such that $s$ remains of order $N^0$ as $N \to \infty$.
The precise value of $\eta$ depends on the function $f$ and the matrix ensemble under consideration.
The general scenario presented in the paper is valid for any choice of function $f$.
Moreover it applies to different matrix ensembles, although we will focus on Wishart matrices (i.e. the Laguerre ensemble of random matrices).
In the sequel, for reasons explained later, we will consider the case $f(\lambda)=1/\lambda$, leading to $\eta=0$.
Denoting by $P_N(\lambda_1, \cdots, \lambda_N)$ the joint probability distribution function for the eigenvalues (for the Laguerre ensemble, Eq.~\eqref{eq:jpdfGamma} below), we can write the
distribution of $s$ as~:
\begin{equation}
	P_{N,\kappa}(s) =  \int \dd \lambda_1 \int \dd \lambda_2 \cdots
			\int \dd \lambda_N \, P_N(\lambda_1, \cdots, \lambda_N)
			\:
		 \delta \bigg(
			s - N^{-\eta} \sum_{i=1}^{p}  f(\lambda_i)
		\bigg)
		\:.
	\label{eq:DefPns0}
\end{equation}
Here, $P_N(\lambda_1, \cdots, \lambda_N)$ is a symmetric function of its $N$ arguments.
Due to the restriction to a fraction of the eigenvalues in \eqref{eq:defTrlinstat0}, the only avalaible approaches seem to be the orthogonal polynomial technique, which provides naturally the $p$-point correlation functions, and the Coulomb gas method.
However the former is restricted to the unitary class and does not permit a simple analysis of the large deviations.
For this reason, we will use the Coulomb gas technique.
Because the method deals with the eigenvalue density, the restriction to a fraction of eigenvalues requires to introduce ``occupation numbers'' $\{n_i\}_{i=1,\cdots,N}$ and write the TLS as~:
\begin{equation}
	s = N^{-\eta} \sum_{i=1}^{N} n_i f(\lambda_i)
	\:,
	\hspace{0.5cm}
	\lambda_1 > \lambda_2 > \cdots > \lambda_N
	\:,
	\label{eq:defTrlinstat}
\end{equation}
where
$n_i=1$ if the eigenvalue $\lambda_i$ contributes to the sum and $n_i = 0$ otherwise.
Note that subset sums $\sum_in_i\lambda_i$ of eigenvalues of certain random matrices recently appeared in the spectral analysis of fermionic systems~\cite{CunMalMez16}.
Since the sum should contain $p$ eigenvalues, the $N!/\big[p!(N-p)!\big]$ acceptable configurations $\lbrace n_i \rbrace$ verify
\begin{equation}
  \sum_{i=1}^{N} n_i = p
  \:.
\end{equation}
Recently, the case where the summation is restricted to the $p$ largest (or smallest) eigenvalues was considered in Ref.~\cite{GraMajTex17}. This corresponds to considering the configuration $n_1 = \cdots = n_{p} = 1$ and $n_{p+1} = \cdots = n_{N} = 0$.
Here, we consider the same problem in the absence of this restriction, which leads us to introduce a new ensemble described by the joint distribution for the two sets of random numbers
\begin{equation}
  \label{eq:DistribLambdaN}
  \boxed{
  \mathscr{P}_{N,p}(\{\lambda_i\},\{n_i\})
  = p!(N-p)!\, P_N(\lambda_1, \cdots, \lambda_N)\,\mathbf{1}_{\lambda_1>\cdots>\lambda_N}\,
  \delta_{p,\sum_in_i}
  }
\end{equation}
where $\mathbf{1}_{\lambda_1>\cdots>\lambda_N}=\prod_{i=1}^{N-1}\heaviside(\lambda_{i}-\lambda_{i+1})$ and $\heaviside(x)$ the Heaviside step function.
Eq.~\eqref{eq:DistribLambdaN} is obviously normalised when integrated over all $\lambda_i$'s and with summation over the occupations.
We can now establish the precise relation with the distribution describing the ``thinned'' random matrix ensembles \cite{BerDui16,BohPat06,ChaCla16,Lam16}, which is obtained by relaxing the constraint on the number $p$.
Denoting $B_N(p)=\begin{pmatrix}N\\p\end{pmatrix}\kappa^p(1-\kappa)^{N-p}$ the binomial distribution, i.e. the probability to select $p$ eigenvalues among the $N$, where $\kappa$ is the probability to select an eigenvalue,  we have
\begin{align}
  \label{eq:RelationWithThinned}
  \mathscr{P}_{N,\kappa}^\mathrm{(thinned)}(\{\lambda_i\},\{n_i\})
  &=
  \sum_{p=0}^N
  B_N(p)\,
  \mathscr{P}_{N,p}(\{\lambda_i\},\{n_i\})
  \\
  \label{eq:ThinnedEnsemble}
  &
  \hspace{-1.25cm}
  = N!\, P_N(\lambda_1, \cdots, \lambda_N)\,\mathbf{1}_{\lambda_1>\cdots>\lambda_N}\,
  \kappa^{\sum_in_i}   \, (1-\kappa)^{N-\sum_in_i}
  \:,
\end{align}
($p$ then fluctuates, its average being $\overline{p}=\kappa\,N$).

The distribution we aim to determine in the paper can be written in terms of \eqref{eq:DistribLambdaN} as
\begin{align}
	\nonumber
	P_{N,\kappa}(s) = \sum_{ \lbrace n_i \rbrace }
		 \int \dd \lambda_1 \int^{\lambda_1} \dd \lambda_2
		& \cdots
			\int^{\lambda_{N-1}} \dd \lambda_N \,
			\mathscr{P}_{N,p}(\{\lambda_i\},\{n_i\})
		\\ \times
		& \delta \bigg(
			s - N^{-\eta} \sum_{i=1}^{N} n_i f(\lambda_i)
		\bigg)
		\:.
	\label{eq:DefPns}
\end{align}
where $\kappa=p/N$ in the subscript of $P_{N,\kappa}(s)$.

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.95\textwidth]{Ph_diag}
	\caption{\it
	  Phase diagram in the $(\kappa,s)$ plane,
	  where $\kappa=p/N$ and $s=N^{-\eta}\sum_{i=1}^{p} f(\lambda_i)$
	  (here for the case $f(\lambda)= 1/\lambda$ in the Laguerre ensemble, thus with $\eta=0$).
	  Insets show
	  the corresponding optimal ``charge'' density profiles.
	  Shaded part of the density (insets on the right) shows the fraction of (largest or smallest) $p$ eigenvalues contributing to $s$.
	  Dashed profiles (Phases II and III) mean fluctuations in the ``occupations'' $\{n_i\}$ (cf. text).
	  In the central part of the diagram (Phase II),
	  the distribution is dominated by entropy,
	  while in Phases I and III it is dominated by the energy.
	  }
	\label{fig:PhDiag}
\end{figure}

\subsection{Main results }

Considering the Laguerre ensemble, Eq.~\eqref{eq:jpdfGamma} below, with $f(\lambda)=1/\lambda$, we have obtained the distribution $P_{N,\kappa} (s)$ in the limit of large matrix size, $N\to\infty$,
when both $\kappa$ and $1-\kappa$ are of order one~; in particular this excludes the case $\kappa\sim1/N$ which is not covered by our approach (the limit $\kappa\to1$ was also identified as a singular limit in Ref.~\cite{GraMajTex17}).
In this limit the multiple integral \eqref{eq:DefPns} is dominated by the optimal configuration for the two sets of  random numbers.
As the two parameters $\kappa$ and $s$ are tuned, we obtain different types of optimal configurations, which are interpreted as different ``phases''.
The phase diagram can be drawn in the $(\kappa,s)$ plane, where the physical available phases are located in the stripe $[0,1]\times[0,\infty[$.
As one increases $s$ for fixed $\kappa$, one encounters three phases described below, the phase transitions taking places at $s=s_0(\kappa)$ and $s=s_1(\kappa)$, which defines two lines in the $(\kappa,s)$ plane (see also Fig.~\ref{fig:PhDiag}):
\begin{itemize}
\item
   Phase I~:
   the optimal configuration $\lbrace \lambda_i \rbrace$, that dominates the integrals \eqref{eq:DefPns}, varies with $(\kappa,s)$ while the occupations $\lbrace n_i \rbrace$ remain frozen.
   This case is conveniently analysed within the conventional Coulomb gas interpretation where the eigenvalues are considered as the positions of a one-dimensional gas of $N$ particles with logarithmic interactions.

\item
   Phase II~:
   $\lbrace \lambda_i \rbrace$ are frozen while $\lbrace n_i \rbrace$ fluctuate.
	To get some insight, we interpret the problem as a gas of $p$ fictitious fermions occupying $N$ fixed ``energy levels'' $\varepsilon_i=f(\lambda_i)$'s.
	This phase includes the typical fluctuations (the dashed line in Fig.~\ref{fig:PhDiag} indicates where $P_{N,\kappa} (s)$ is maximum).

\item
   Phase III~:
   the last phase is described in terms of a
   mixed picture where one single eigenvalue splits off the bulk, while the density of the remaining eigenvalues is frozen and the occupation numbers fluctuate (they freeze as $s\to\infty$).
\end{itemize}
The different phases are related to the following behaviours for the distribution of the TLS~\footnote{Expressions of the type $P_{N,\kappa}(s) \underset{N\to\infty}{\sim} \exp(-N^q \Phi)$ must be understood as
$\lim_{N \to \infty} (-1/N^q) \ln P_{N,\kappa}(s) = \Phi$.
}~:
\begin{align}
  \label{eq:SummarisePN}
  &P_{N,\kappa} (s)
  \\
  \nonumber
  &\underset{N \to \infty}{\sim}\begin{cases}
    \e^{- N\,C_\kappa}
    \exp \left\lbrace - \frac{\beta N^2}{2} \Phi_-(\kappa;s)  \right\rbrace
    & \text{for }    s < s_0(\kappa)
    \\[0.2cm]
   \exp \left\lbrace - N \Phi_0(\kappa;s) \right\rbrace
	\hspace{0.5cm}
	& \text{for }    s_0(\kappa)<s<s_1(\kappa)
	\\[0.2cm]
	N^{-\frac{\beta N}{2}}
	\exp \left\lbrace -
	   N\left[ \frac{\beta }{2}\Phi_+(\kappa;s) + \Phi_0(\kappa; \tilde{s}(s)) \right] \right\rbrace
	& \text{for }     s > s_1(\kappa)
  \end{cases}
\end{align}
where $\tilde{s}(s)$ smoothly interpolates between $s_1(\kappa)$ and $\kappa$ (it will be studied in Section~\ref{sec:LDFlarge}).
The large deviation function in the last expression combines two different functions with different origins (energy \textit{versus} entropy).
A sketch of the distribution is represented in Fig.~\ref{fig:SchemaDistr}.
The different scalings with $N$ in the exponential arise from the fact that entropy $\sim N$ dominates in Phase II,  including the typical fluctuations, while energy $\sim N^2$ dominates in Phase I  (the scaling for Phase III is due to a subleading contribution to the energy).
The scaling in Phase II implies in particular that the fluctuations of the TLS scale as $\sim1/\sqrt{N}$ (and are independent of the symmetry index $\beta$).
The limiting behaviours of the large deviation functions for the three regimes are~:
\begin{align}
	&\Phi_-(\kappa;s) \simeq
	\begin{cases}
		\displaystyle
		\frac{\kappa^2}{s} + \frac{3 \kappa(2-\kappa)}{2} \ln s
		+ \mathrm{cste}
		& \text{as } s \to 0
		\\[0.2cm]
		\displaystyle
		\omega_\kappa\, (s - s_0(\kappa))^2
		& \text{as } s \to s_0(\kappa)^-
	\end{cases}
	\\
	&\Phi_0(\kappa;s) \simeq
	\begin{cases}

		C_{\kappa}
		- c_+ \sqrt{s - s_{0}(\kappa) }
		& \text{as } s \to s_0(\kappa)^+
		\\[0.2cm]
		\displaystyle
		\frac{(s-\kappa)^2}{2 \kappa(1-\kappa)}
		& \text{as } s \to \kappa
		\\[0.2cm]

		C_{\kappa}
		- \tilde{c}_+ \sqrt{ s_{1}(\kappa) - s }
		& \text{as } s \to s_1(\kappa)^-
	\end{cases}
	\\
	&\Phi_+(\kappa;s) + \frac{2}{\beta} \Phi_0(\kappa;\tilde{s}(s)) \simeq
	\begin{cases}
		\displaystyle
		 \ln(s - s_1(\kappa) )  + \mathrm{cste}
		& \text{as } s \to s_1(\kappa)^+
		\\[0.2cm]
		\displaystyle
		 \ln (s - \kappa)
		 + \mathrm{cste}
		& \text{as } s \to +\infty
	\end{cases}
\end{align}
where $\omega_\kappa$, $C_{\kappa}=-\kappa \ln \kappa - (1-\kappa) \ln (1-\kappa)$, $c_+$ and $\tilde{c}_+$ are positive constants.

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.8\textwidth]{Schema_distr}
	\caption{\it
	 Sketch of the distribution $P_{N,\kappa}(s)$ obtained in the paper, Eq.~\eqref{eq:SummarisePN}.
	  }
	\label{fig:SchemaDistr}
\end{figure}

\subsection{Plan}

Section~\ref{sec:Motivation} exposes the motivations which have led us to the study of the distribution of the TLS for $f(\lambda)=1/\lambda$.
In Section~\ref{sec:Coulombgas}, we will describe Phase I, which will be analysed within the usual Coulomb gas picture. We will introduce the notations.
The derivation of the results has been made as short as possible, as the problem is similar to the one studied in our previous article~\cite{GraMajTex17}, although the case considered here is more complicated (in Ref.~\cite{GraMajTex17}, we have made use of simplifications arising from the specific choice $f(\lambda)=\sqrt{\lambda}$).
Section~\ref{sec:TypFluct} will discuss Phase II, analysed within the picture of fictitious non interacting fermions.
Phase III is studied in Section~\ref{sec:LDFlarge}.
The paper is closed by some concluding remarks.

\section{Motivations~: proper time delays \textit{versus} diagonal elements of the Wigner-Smith matrix in chaotic scattering}
\label{sec:Motivation}

\subsection{Chaotic scattering in quantum dots and random matrices}
\label{sec:QuantScatt}

The problem studied in this article is motivated by the statistical analysis of partial sums of proper time delays in chaotic scattering.
Proper time delays are characteristic times capturing temporal aspects of quantum scattering (for a review on time delays, cf.~\cite{CarNus02}~; aspects related to chaotic scattering are reviewed in \cite{FyoSom97,Kot05,KuiSavSie14,Tex16}).
For the sake of concreteness, let us consider a quantum dot (QD) connected to external contacts playing the role of wave guides through which electrons can be injected (Fig.~\ref{fig:qd}).
An electronic wave of energy $\varepsilon$ injected in the conducting channel $a$ is scattered in channel $b$ with probability amplitude given by the matrix element $\mathcal{S}_{ba}(\varepsilon)$ of the $N\times N$ on-shell scattering matrix $\mathcal{S}(\varepsilon)$.
Probing the energy structure of  $\mathcal{S}(\varepsilon)$ allows one to define several characteristic times.
Ref.~\cite{Tex16} has emphasized the difference between the \textit{partial} time delays $\{\tilde{\tau}_i\}$, which are derivatives of the scattering phase shifts, and the \textit{proper} time delays $\{\tau_i\}$, which are eigenvalues of the Wigner-Smith matrix
\begin{equation}
  \mathcal{Q}=-\I \mathcal{S}^\dagger\partial_\varepsilon \mathcal{S}
  \:.
\end{equation}
In other words, these two sets of characteristic times are obtained by performing derivation and diagonalisation in different orders.
They however satisfy the sum rule $\sum_i\tilde\tau_i=\sum_i\tau_i$.

\begin{figure}[!ht]
\centering
\includegraphics[width=0.4\textwidth]{qd}
\caption{\it A chaotic quantum dot with four perfect contacts. Contact $\alpha$ has $N_\alpha$ open channels.}
\label{fig:qd}
\end{figure}

The Wigner-Smith matrix is a central concept allowing to characterize the amount of injected charge in the QD, which can be understood from Krein-Friedel type formulae relating the scattering matrix to the density of states.
This observation has played a major role in B\"uttiker's quantum transport theory for coherent devices beyond DC linear transport~: non-linear transport \cite{ChrBut96a}, AC transport \cite{ButPreTho93,ChrBut96,GraTex15}, pumping, frequency dependent noise, etc (see \cite{Tex16} for a review and further references).
An important observation is that, in order to address the out-of-equilibrium situation, the contribution of the electrons from a given contact must be identified.
This has led to the concept of \textit{injectance},
$\overline{\nu}_\alpha=(2\pi)^{-1}\sum_{i\in\mathrm{contact}\:\alpha}\mathcal{Q}_{ii}$,
measuring the contribution to the density of states (DoS) inside the device of the scattering states incoming from the channels associated with the contact $\alpha$~;
hence the total DoS is $\sum_\alpha\overline{\nu}_\alpha=(2\pi)^{-1}\tr{\mathcal{Q}}$, which is related to the Wigner time delay~:
\begin{equation}
  \label{eq:DoSSumRule}
  \tau_W
  = \frac{1}{N}\sum_i \mathcal{Q}_{ii} = \frac{1}{N}\sum_i\tau_i
  \:.
\end{equation}
The symmetric concept of \textit{emittance},
$\underline{\nu}_\alpha=(2\pi)^{-1}\sum_{i\in\mathrm{contact}\:\alpha}[\mathcal{S}\mathcal{Q}\mathcal{S}^\dagger]_{ii}$,
was also introduced in order to allow for a postselection of the contact,
whereas the injectance $\overline{\nu}_\alpha$ corresponds to the preselection (see Ref.~\cite{GasChrBut96} and the review \cite{Tex16}).

In systems with complex dynamics, such as chaotic quantum dots (Fig.~\ref{fig:qd}), the statistical approach is the most efficient, which leads to assume that the scattering matrix $\mathcal{S}$ belongs to a random matrix ensemble~\cite{Bee97,MelKum04}.
In chaotic QDs with perfect contacts, it is quite natural to choose the uniform distribution over the unitary group, up to some additional constraints related to the symmetry (time reversal symmetry and/or spin rotation symmetry)~: this corresponds to the so-called circular matrix ensembles.
This approach however does not provide any information on the energy structure of the scattering matrix, what is required in order to characterize the statistical properties of the matrix $\mathcal{Q}$.
An ``alternative stochastic approach'' has been introduced in \cite{BroBut97} and applied in \cite{BroFraBee97,BroFraBee99} where the Wigner-Smith matrix distribution was shown to be related to the Laguerre ensemble of random matrices~\cite{BroFraBee97,BroFraBee99}.~\footnote{
  Refs.~\cite{BroFraBee97,BroFraBee99} has introduced the symmetrized Wigner-Smith matrix $\mathcal{Q}_s=-\I\mathcal{S}^{-1/2}\,\partial_\varepsilon\mathcal{S}\,\mathcal{S}^{-1/2}$, with the same spectrum of eigenvalues than $\mathcal{Q}$.
  The precise statement of these references is that $1/\mathcal{Q}_s$ is a Wishart matrix.
  Because $\mathcal{S}$ and $\mathcal{Q}$ are only independent in the unitary case, $1/\mathcal{Q}$ is a Wishart matrix only in this case, strictly speaking.
  However its eigenvalues are always given by the Laguerre distribution~\eqref{eq:jpdfGamma}.
}
The joint distribution of the inverse of the proper times $\lambda_i=\tau_\mathrm{H}/\tau_i$ is
\begin{equation}
	P_N(\lambda_1, \cdots, \lambda_N) \propto
		\prod_{i<j} \abs{\lambda_i - \lambda_j}^\beta
		\prod_{n=1}^N \lambda_n^{\beta N/2} \e^{-\beta \lambda_n/2}
		\:,
	\label{eq:jpdfGamma}
\end{equation}
where $\beta\in\{1,\,2,\,4\}$ is the Dyson index corresponding to orthogonal, unitary and symplectic classes.
The time scale denotes the Heisenberg time $\tau_\mathrm{H}=2\pi/\Delta$, where $\Delta$ is the mean level spacing (or mean resonance spacing).
The DoS interpretation thus leads to $(2\pi)^{-1}\smean{\tr{\mathcal{Q}}}=1/\Delta$.
Combined with the sum rule \eqref{eq:DoSSumRule}, we have
\begin{equation}
  \smean{\tau_W}=\smean{\mathcal{Q}_{ii}}=\smean{\tau_i}= \frac{\tau_\mathrm{H}}{N}
  \:.
\end{equation}
This scale is also known as the dwell time and measures the average time spent by a wave packet inside the quantum dot.
Later we will set $\tau_\mathrm{H}=1$ for simplicity.
The variance and the correlations of proper times are also known (see updated arXiv version of \cite{Tex16} and references therein)~\cite{Sav16}~:
\begin{align}
  \label{eq:VarianceTaua}
	\mathrm{Var}(\tau_i) &= \frac{N[\beta(N-1)+2] + 2}{N^2(N+1)(\beta N - 2)}
	\:,
	\\
  \label{eq:CovarianceTaua}
	\mathrm{Cov}(\tau_i, \tau_j) &= - \frac{1}{N^2(N+1)}
	\hspace{1cm}\mbox{for } i\neq j
	\:.
\end{align}
(other references on time delay correlations are \cite{KuiSavSie14,Nov15a,CunMezSimViv16b}, and can also be found in the review papers quoted above).

The joint distribution for the partial time delays $\tilde{\tau}_i$'s and the diagonal matrix elements $\mathcal{Q}_{ii}$'s are still unknown.
An interesting connection between them was pointed out in \cite{SavFyoSom01} (see also \cite{KuiSavSie14})~:
introducing the unitary matrix $\mathcal{V}$ which diagonalizes the scattering matrix, these authors have obtained the non trivial relation $\tilde{\tau}_i=\big[\mathcal{V}^\dagger \mathcal{Q}\mathcal{V}\big]_{ii}$.
In the unitary case, $\mathcal{V}$ is expected to be independent of $\mathcal{Q}$.
Because $\mathcal{Q}$ is invariant under unitary transformations in this case, we have $\tilde{\tau}_i=\mathcal{Q}_{ii}$.
Let us emphasize few properties of the $\mathcal{Q}_{ii}$'s, which are important as they are involved in the injectances  which should be accessible experimentally, and emphasize their difference with the proper times.
$\mathcal{Q}_{ii}$'s and $\tau_i$'s can be related by writing
$\mathcal{Q}=\mathcal{U}\,\mathrm{diag}(\tau_1,\,\cdots,\,\tau_N)\,\mathcal{U}^\dagger$  (the unitary matrices $\mathcal{V}$ and $\mathcal{U}$ differ in general), so that
\begin{equation}
  \label{eq:RelationQiiTau}
  \mathcal{Q}_{ii} = \sum_{j=1}^N \left|\mathcal{U}_{ij}\right|^2\tau_j
  \:.
\end{equation}
In the unitary case ($\beta=2$) the matrix $\mathcal{U}$ and the eigenvalues are uncorrelated, which allows to go further in the statistical analysis of the $\mathcal{Q}_{ii}$'s (this is not the case in the orthogonal and symplectic cases~\cite{BroFraBee99}). Thus we will focus on the unitary case for a moment, and will come back to the general case later.
Correlations of the $\mathcal{U}$ matrix elements are controlled by Weingarten functions \cite{Col03}.
Some algebra gives~\footnote{
  We have used
  \begin{align*}
	\int_{U(N)} \dd U\,
	  U_{i_1 j_1} U_{i_2 j_2} U^*_{k_1 l_1} U^*_{k_2 l_2}
		&= W(N,1^2)
		\left(
			\delta_{i_1 k_1} \delta_{i_2 k_2} \delta_{j_1 l_1} \delta_{j_2 l_2}
			+ \delta_{i_1 k_2} \delta_{i_2 k_1} \delta_{j_1 l_2} \delta_{j_2 l_1}
		\right)
		\\ \nonumber
		& + W(N,2)
		\left(
			\delta_{i_1 k_1} \delta_{i_2 k_2} \delta_{j_1 l_2} \delta_{j_2 l_1}
			+ \delta_{i_1 k_2} \delta_{i_2 k_1} \delta_{j_1 l_1} \delta_{j_2 l_2}
		\right)
		\:,
  \end{align*}
  where the Weingarten functions $W(N,\sigma)$ is a function of the matrix size and the permutation of indices. In particular~:
  $
	W(N,1^2) = \frac{1}{N^2-1}
  $
  and
  $
	W(N,2) = -\frac{1}{N(N^2-1)}
  $.
}
\begin{equation}
  \label{eq:CovQii}
  \mathrm{Cov}\left( \mathcal{Q}_{ii} , \mathcal{Q}_{jj} \right) =
  \frac{1}{N(N^2-1)}
  \left(\frac{1}{N} + \delta_{i,j}\right)
  \:.
\end{equation}
In the particular case $i=j$, this result coincides with the one first obtained in \cite{FyoSom97} (note that this reference has also obtained the variance for non ideal leads).
Eq.~\eqref{eq:CovQii}
matches with the covariances of the partial times given in the updated arXiv version of \cite{Tex16},
$\mathrm{Cov}\left( \mathcal{Q}_{ii} , \mathcal{Q}_{jj} \right) = \mathrm{Cov}(\tilde\tau_i, \tilde\tau_j)$
(see the discussion in Appendices A and E of \cite{KuiSavSie14}).
Both the scaling with $N$ and the sign of the correlations for $\mathcal{Q}_{ii}=\tilde{\tau}_i$'s and $\tau_i$'s differ~:
$\mathrm{Var}\big( \mathcal{Q}_{ii} \big)\simeq(1/N)\,\mathrm{Var}(\tau_i)\simeq1/N^3$ and
$\mathrm{Cov}\big( \mathcal{Q}_{ii} , \mathcal{Q}_{jj} \big)\simeq-(1/N)\,\mathrm{Cov}(\tau_i, \tau_j)\simeq+1/N^4$,
where the factor $1/N$ can be understood as the contribution of the unitary matrix elements in \eqref{eq:RelationQiiTau}.
\iffalse
The striking difference between the two quantities is best understood from the relation
\begin{equation}
  \mathrm{Var}\big( \mathcal{Q}_{ii} \big) = \frac{1}{N+1}
  \left[
    \frac{1}{N}\mathrm{Var}\big(\sum_i\tau_i\big) + \mathrm{Var}(\tau_i)
  \right]
  \:.
\end{equation}
If $\tau_i$'s were identical and idependent random variables, $\mathrm{Var}\big(\sum_i\tau_i\big)=N\mathrm{Var}(\tau_i)$, the first term would dominate which would lead to ``$\mathrm{Var}\big( \mathcal{Q}_{ii} \big)\simeq(2/N)\mathrm{Var}(\tau_i)$''.
Instead, the proper times are strongly anti-correlated, resulting in $\mathrm{Var}\big(\sum_i\tau_i\big)\sim\mathrm{Var}(\tau_i)$ and therefore $\mathrm{Var}\big( \mathcal{Q}_{ii} \big)\simeq(1/N)\mathrm{Var}(\tau_i)$.
\fi

\subsection{Partial sums of $\tau_i$'s or $\mathcal{Q}_{ii}$'s : different scaling with $N$}

These relations lead to important differences bewteen partial sums of $\mathcal{Q}_{ii}$'s and $\tau_i$'s.
Considering a contact with $p$ conducting channels, the two first cumulants of the related injectance  are
\begin{align}
  \Big\langle \sum_{i=1}^p  \mathcal{Q}_{ii} \Big\rangle
  &= \frac{p}{N} \equiv \kappa
  \\
  \label{eq:VarianceSumQii}
  \mathrm{Var}\Big( \sum_{i=1}^p \mathcal{Q}_{ii} \Big)
  &= \frac{\kappa(1+\kappa)}{N^2-1}
\end{align}
(the leading order to the second expression was given in \cite{Tex16}, Eq.~85 of the arXiv version~; it was deduced from the results of \cite{BroBut97}).
On the other hand, the fluctuations of the partial sum of proper time delays can be deduced from (\ref{eq:VarianceTaua},\ref{eq:CovarianceTaua}) by writing
$
\mathrm{Var}\big( \sum_{i=1}^p  \tau_{i} \big)
=
p\, \mathrm{Var}(\tau_i) + p(p-1)\, \mathrm{Cov}(\tau_i,\tau_j)
$, explicitly
\begin{equation}
  \label{eq:VarianceSumTaui}
  \mathrm{Var}\Big( \sum_{i=1}^p  \tau_{i} \Big)
  = \frac{\kappa(1-\kappa)}{N+1} + \frac{2\kappa}{N^2-1}
  \:.
\end{equation}
Comparing \eqref{eq:VarianceSumQii} and \eqref{eq:VarianceSumTaui} leads to two interesting observations~:
\begin{itemize}
\item  For $\kappa<1$, the variance of the injectance  is $\sim(1/N)$ smaller than the variance of partial sum of $\tau_i$'s~:
  $\mathrm{Var}\big( \sum_{i=1}^p\mathcal{Q}_{ii} \big)\sim(1/N)\,\mathrm{Var}\big( \sum_{i=1}^p  \tau_{i} \big)$.
\item  For $\kappa=1$, they are both equal to $\mathrm{Var}\big(\tr{\mathcal{Q}}\big)=2/(N^2-1)$ as the two quantities satisfy the sum rule~\eqref{eq:DoSSumRule}.
\end{itemize}
This is a consequence of the fact that $\mathrm{Var}\big( \sum_{i=1}^p  \tau_{i} \big)$ drops by a factor $1/N$ as $\kappa\to1$.
In other words, $\mathrm{Var}\big( \sum_{i=1}^p  \tau_{i} \big)/\smean{ \sum_{i=1}^p  \tau_{i} }^2$ crosses over from $\simeq(1-\kappa)/(\kappa N)\sim1/p$, as in the case of $p$ independent variables, to $\simeq2/N^2$, characteristic of the $N$ highly correlated eigenvalues of random matrices.
A similar change of scaling has been recently identified in the ``thinned circular ensemble'' in Ref.~\cite{BerDui16}.
These intringuing features have led us to analyse the full distribution of these two partial sums.
The distribution of the injectance $\overline{\nu}=(2\pi)^{-1}\sum_{i=1}^p \mathcal{Q}_{ii}$ is obtained in Appendix~\ref{app:Injectance} for $\beta=2$.
This derivation is based on a result of Savin, Fyodorov and Sommers~\cite{SavFyoSom01}, stating that, for $\beta=2$, the distribution of a sub-block of the matrix $\mathcal{Q}$ is also related to the Laguerre distribution.~\footnote{The more general statement of Ref.~\cite{SavFyoSom01} concerns sub-block of matrix $\mathcal{Q}_s$, introduced in the previous footnote. The distributions of the two matrices $\mathcal{Q}$ and $\mathcal{Q}_s$ coincide for $\beta=2$.}
This makes this study a variant of the Wigner time delay distribution analysis of Ref.~\cite{TexMaj13}~:
the distribution of the partial sum $\sum_{i=1}^p\mathcal{Q}_{ii}$ is studied in Appendix~\ref{app:Injectance}.
On the other hand, the question of the distribution of the truncated linear statistics
\begin{equation}
  \label{eq:LSofInterest}
  s = \sum_{i=1}^p \tau_i
   = \tau_\mathrm{H} \sum_{i=1}^p \frac{1}{\lambda_i}
  \:,
\end{equation}
where $\lambda_i$'s are eigenvalues of a Wishart matrix, Eq.~\eqref{eq:jpdfGamma}, is much more challenging and is the main object of investigation of the present article.

\subsection{Variance for arbitrary symmetry class}

The discussion of the statistical properties of $\mathcal{Q}_{ii}$'s has led us to restrict ourselves to the unitary case.
However, as we will study the full distribution of $s$ for arbitrary symmetry class, it is useful to express the two cumulants of $s$ for arbitrary $\beta$.
Using Eqs.~(\ref{eq:VarianceTaua},\ref{eq:CovarianceTaua}) we get
\begin{align}
	\label{eq:MeanS}
	\mean{s} &= \sum_{i=1}^p \mean{\tau_i} = \frac{p}{N} = \kappa
	\:,
    \\
	\label{eq:VarSfiniteN}
	\mathrm{Var}(s)

	&= \frac{\beta p N(N - p) + 2 p(p+N)}{N^2(N+1)(\beta N - 2)}
	\\
	\label{eq:VarS}
	&= \frac{\kappa(1-\kappa)}{N}
		+ \frac{4 \kappa}{\beta N^2} \left( 1 - \beta \frac{1-\kappa}{4} \right) + \mathcal{O}(N^{-3})
	\:.
\end{align}
Setting $\kappa = 1$, we check that \eqref{eq:VarSfiniteN} gives the result of Ref.~\cite{MezSim13}~:
\begin{equation}
	\mathrm{Var}(s)
	= \frac{4}{(N+1)(N\beta-2)}
	\underset{N \to \infty}{\simeq}
		\frac{4}{\beta N^2}
\end{equation}
(the leading order was obtained earlier in \cite{LehSavSokSom95} for $\beta=1$ and \cite{BroBut97}~; see also \cite{TexMaj13,Tex16}).
Eq.~\eqref{eq:VarS} exhibits another interesting feature as the leading order term is independent of the symmetry class, while the subleading term surviving in the $\kappa\to1$ limit does depend on $\beta$.
The origin of this observation will be clarified in Section~\ref{sec:TypFluct}.

\section{Phase I ($s < s_0(\kappa)$)~: Coulomb gas}
\label{sec:Coulombgas}

\subsection{Formalism~: Coulomb gas and occupation numbers}

Let us introduce the general framework used in the paper. For large $N$, it is convenient to rescale the eigenvalues as \cite{GraMajTex17}
\begin{equation}
	\lambda_i = N x_i \:.
\end{equation}
The Coulomb gas method consists in rewriting the joint distribution of eigenvalues (\ref{eq:jpdfGamma}) as a Gibbs measure $\exp(- \beta N^2 \mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace]/2)$, where
\begin{equation}
	\mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace] =
		-\frac{1}{N^2} \sum_{i \neq j} \ln \abs{x_i - x_j}
		+ \frac{1}{N} \sum_{i=1}^N (x_i - \ln x_i)
	\label{eq:Ediscr}
\end{equation}
is the energy of a gas of particles on a line, at positions $\lbrace x_i \rbrace$, interacting with logarithmic repulsion and trapped in the external potential $V(x) = x - \ln x$.
We want to compute the distribution of
\begin{equation}
	s = \frac{1}{N} \sum_{i=1}^N n_i f(x_i)
	\:,
	\hspace{0.5cm}
	x_1 > x_2 > \cdots > x_N
	\:,
	\label{eq:DefSRescaled}
\end{equation}
for any given function $f$. This is given by Eq.~(\ref{eq:DefPns}), which rewrites~:
\begin{align}
	\label{eq:PnsRatioMultInt}
	&P_{N,\kappa}(s) = \\
	&\frac{ \displaystyle
		\sum_{ \lbrace n_i \rbrace }
		 \int_0^\infty \hspace{-0.25cm} \dd x_1 \int_0^{x_1} \hspace{-0.25cm}\dd x_2 \cdots
			\int_0^{x_{N-1}}\hspace{-0.25cm} \dd x_N \,
			\e^{-\frac{\beta N^2}{2} \mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace] }
		\delta \left(
			s - \frac{1}{N} \sum_{i=1}^{N} n_i f(x_i)
		\right)
		\,
		\delta_{\Nt,\sum_i \m_i}
	}
	{ \displaystyle
		\sum_{ \lbrace n_i \rbrace }
		 \int_0^\infty \hspace{-0.25cm}\dd x_1 \int_0^{x_1} \hspace{-0.25cm}\dd x_2 \cdots
			\int_0^{x_{N-1}}\hspace{-0.25cm} \dd x_N \,
			\e^{-\frac{\beta N^2}{2} \mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace] }
			\,
			\delta_{\Nt,\sum_i \m_i}
	}
	\nonumber
		\:.
\end{align}

Since we are interested in partial sums of proper time delays $\tau_i = 1/\lambda_i = 1/(N x_i)$, we will consider the case
$$
	f(x) = \frac{1}{x}
	\:.
$$
Therefore, Eq.~(\ref{eq:DefSRescaled}) gives $s = N^{-1} \sum_i n_i / x_i$. The limit $s \to 0$ corresponds to $x_i \to \infty$, for all $p$ eigenvalues such that $n_i = 1$. The $N - p$ others which do not contribute to the sum are not constrained, so they remain of order~1. Thus, in this case, the $p$ eigenvalues in the sum are the largest. This corresponds to
\begin{equation}
	n_1 = \cdots = n_{p} = 1 \: ,
	\hspace{0.5cm}
	n_{p+1} = \cdots = n_{N} = 0 \:.
	\label{eq:niFrozen}
\end{equation}
Eq.~(\ref{eq:DefSRescaled}) reduces to~:
\begin{align}
	s = \frac{1}{N} \sum_{i=1}^{p} f(x_i)
	\:,
	\hspace{0.5cm}
	x_1 > x_2 > \cdots > x_N
		\:.
	\label{eq:sLargest}
\end{align}
This problem was analysed in detail in \cite{GraMajTex17}, for some specific choices of function $f$. The general case is discussed in the appendix of this paper. Here we will only sketch briefly the method in order to be self-contained.

In the remainder of this section, we will focus on the situation where the occupation numbers $\lbrace n_i \rbrace$ are frozen according to (\ref{eq:niFrozen}). This will be the case as long as $s < s_0(\kappa)$.
In Sections~\ref{sec:TypFluct} and~\ref{sec:LDFlarge}, we will study the case $s > s_0(\kappa)$ where the $\lbrace n_i \rbrace$'s are allowed to fluctuate.

\subsection{Functional integral formulation}

Let us introduce the empirical density of eigenvalues
\begin{equation}
	\rho(x) = \frac{1}{N} \sum_{i=1}^N \delta(x - x_i)
	\:.
	\label{eq:defEmpDens}
\end{equation}
In terms of this density, (\ref{eq:sLargest}) reads~:
\begin{equation}
	s = \int_c \rho(x)f(x) \dd x \:,
	\label{eq:ConstrScoulomb}
\end{equation}
where $c \sim x_{p}$ is a lower bound ensuring that only the $p$ largest eigenvalues contribute to the integral. It is fixed by imposing
\begin{equation}
	\int_c \rho(x) \dd x = \frac{p}{N} = \kappa
	\:.
	\label{eq:ConstrKcoulomb}
\end{equation}
We emphasize that it is only possible to express $s$ in terms of a simple integral over the density of eigenvalues $\rho(x)$ in the case where only the largest (or the smallest) eigenvalues contribute to $s$, corresponding to large deviations.
In the limit $N \to \infty$, it is possible to rewrite the multiple integrals in Eq.~(\ref{eq:PnsRatioMultInt}) as functional integrals over the density, leading to the measure~\cite{DysonI,DeaMaj08}~:
\begin{equation}
	\e^{-\frac{\beta N^2}{2} \mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace] }
	\dd x_1 \cdots \dd x_N
		\rightarrow
	\e^{- \frac{\beta N^2}{2} \mathscr{E}[\rho] + N (1 - \frac{\beta}{2}) \mathscr{S}[\rho]}
	\D \rho
	\:,
	\label{eq:MeasurePathInt}
\end{equation}
with the energy
\begin{equation}
	\mathscr{E}[\rho] = - \int \dd x \int \dd y \: \ln \abs{x-y}
		+ \int \dd x \: \rho(x)(x - \ln x)
	\label{eq:Erho}
\end{equation}
and the entropy
\begin{equation}
	\mathscr{S}[\rho] = -\int \dd x \: \rho(x) \ln \rho(x)
	\:.
	\label{eq:Srho}
\end{equation}
The energy $\mathscr{E}[\rho]$ is obtained by rewriting (\ref{eq:Ediscr}) in terms of the density (\ref{eq:defEmpDens}). The diagonal terms $i=j$ which are not present in (\ref{eq:Ediscr}) are removed by adding the term $-\big[{\beta}/{(2N)}\big] \mathscr{S}[\rho]$ \cite{DysonII,DeaMaj08}. The other entropic term $({1}/{N}) \mathscr{S}[\rho]$ comes from the loss of information when describing the set $\lbrace x_i \rbrace$ by the density $\rho(x)$.

Since we are interested in the limit $N \to \infty$, we can neglect the subleading entropic term.
Eq.~(\ref{eq:PnsRatioMultInt}) becomes~:
\begin{align}
	\label{eq:PnsRatioPathInt}
	&P_{N,\kappa}(s) \simeq \e^{- N\,C_\kappa} \\
	&\frac{ \displaystyle
		 \int \dd c \int \D \rho \:
			\e^{-\frac{\beta N^2}{2} \mathscr{E}[\rho] }
		\delta \left(
			 \int_c \rho - \kappa
		\right)
		\delta \left(
			 \int^c \rho - (1-\kappa)
		\right)
		\delta \left(
			s - \int_c \rho(x) f(x) \: \dd x
		\right)
	}
	{ \displaystyle
		\int \dd c \int \D \rho \:
			\e^{-\frac{\beta N^2}{2} \mathscr{E}[\rho] }
		\delta \left(
			 \int_c \rho - \kappa
		\right)
		\delta \left(
			 \int^c \rho - (1-\kappa)
		\right)
	}
	\nonumber
		\:,
\end{align}
where the factor $\e^{- N\,C_\kappa}$, with $C_\kappa=-\kappa\ln\kappa-(1-\kappa)\ln(1-\kappa)$, arises from the sum over occupations in the denominator of \eqref{eq:PnsRatioMultInt} (cf. discussion in Section~\ref{sec:TypFluct}).
This additionnal factor would be absent if one would consider the distribution of the TLS restricted to the largest eigenvalue, like in Ref.~\cite{GraMajTex17}~:
\eqref{eq:PnsRatioPathInt} without $\e^{- N\,C_\kappa}$ would describe the full range and would be clearly normalized.
Here, this form only describes the \textit{tail} of the distribution of the TLS without restriction on the ordering of the eigenvalues, when $s<s_0(\kappa)$, hence the expression has no reason to be normalised.
These integrals can be estimated using a saddle point method. The saddle point will give $\rho$ and $c$ as functions of $\kappa$ and $s$.
The numerator is dominated by the density $\rho^\star(x;\kappa,s)$ which minimizes the energy $\mathscr{E}[\rho]$ under the constraints imposed by the Dirac $\delta$-functions.
Similarly, the denominator is dominated by a density $\rho_0^\star(x)$.
The minimization takes the form similar to (\ref{eq:FCoulomb},\ref{eq:MinFapp}), with additional constraints, which leads to two coupled integral equations, instead of one \eqref{eq:MinFapp}.
The precise equations can be found in Ref.~\cite{GraMajTex17}, where this procedure was carried out explicitly.
Here, we will simply jump to the solution of the coupled integral equations (see below Eq.~\eqref{eq:rhoSpl}).
Finally, we obtain the distribution
\begin{equation}
  \boxed{
	P_{N,\kappa}(s) \underset{N \to \infty}{\sim}
	    \e^{- N\,C_\kappa }
		\exp \left\lbrace - \frac{\beta N^2}{2} \Phi_-(\kappa;s)  \right\rbrace
	\hspace{0.5cm}
	\text{for}
	\hspace{0.5cm}
	 s < s_0(\kappa)
	}

	\label{eq:PnsLDFL}
\end{equation}
where we have introduced the large deviation function
\begin{equation}
	\Phi_-(\kappa;s) = \mathscr{E}[\rho^\star(x;\kappa,s)] - \mathscr{E}[\rho_0^\star(x)]
	\:.
	\label{eq:LDFLenegy}
\end{equation}
In \eqref{eq:PnsLDFL}, the scaling as $N^2$ is a manifestation of energy of the Coulomb gas and reflects the long range nature of the interaction between the $N$ particles.

\subsection{Optimal density}

The density $\rho^\star$ is given explicitly in the general case in the appendix of Ref.~\cite{GraMajTex17}. For any monotonic function $f$, it reads~:
\begin{align}
	\label{eq:rhoSpl}
	\rho^\star(x;\kappa,s) = & \frac{1}{2\pi} \sqrt{\frac{(b-x)(d-x)}{(x-a)(c-x)}}
	\\
	& \times \left\lbrace
		1 - \frac{1}{x} \sqrt{\frac{ac}{bd}} + \mu_1
		\Xint-_c^d \frac{\dd t}{\pi} \frac{f'(t)}{t-x} \sqrt{\frac{(t-a)(t-c)}{(t-b)(d-t)}}
	\right\rbrace
	\:,
	\nonumber
\end{align}
where the principal value is needed only if $x \in [c,d]$. This density is supported on two disjoint intervals $[a,b]$ and $[c,d]$ (see Fig.~\ref{fig:RhoSplit}), where $c$ is the boundary introduced above in Eqs.~(\ref{eq:ConstrScoulomb},\ref{eq:ConstrKcoulomb}). The boundaries of these intervals and the parameter $\mu_1$ are fixed by the conditions that the density vanishes at these points~:
\begin{align}
	1 -  \sqrt{\frac{a}{bcd}} + \mu_1 \int_c^d \frac{\dd t}{\pi} f'(t) \sqrt{\frac{t-a}{(t-b)(t-c)(d-t)}} &=0
	\:,
	\label{eq:RhoCond1}
\\
	3 + \frac{a+c-b-d}{2} - \sqrt{\frac{ac}{bd}}
	- \mu_1 \int_c^d \frac{\dd t}{\pi} f'(t) \sqrt{\frac{(t-a)(t-c)}{(t-b)(d-t)}} &= 0
	\: ,
	\label{eq:RhoCond2}
\\
	1 - \sqrt{\frac{c}{a b d}} + \mu_1 \int_c^d \frac{\dd t}{\pi} f'(t) \sqrt{\frac{t-c}{(t-a)(t-b)(d-t)}} &= 0
	\:,
	\label{eq:RhoCond3}
\end{align}
along with the constraints
\begin{equation}
	\int_c^d \rho^\star(x;\kappa,s) \dd x = \kappa \:,
	\hspace{1cm}
	\int_c^d \rho^\star(x;\kappa,s) f(x) \dd x = s\:.
	\label{eq:RhoCond4}
\end{equation}
The parameter $\mu_1$ is a Lagrange multiplier introduced to handle the constraint on $s$. We denote $\mu_1^\star(\kappa;s)$ the solution of (\ref{eq:RhoCond1},\ref{eq:RhoCond2},\ref{eq:RhoCond3},\ref{eq:RhoCond4}). Its knowledge allows to compute easily the energy thanks to the thermodynamic identity \cite{GraTex15,CunFacViv16,GraTex16b}~:
\begin{equation}
	\deriv{\mathscr{E}[\rho^{\star}(x;\kappa,s)]}{s} = - \mu_1^\star(\kappa;s)
	\:.
	\label{eq:ThermoIdCoulomb}
\end{equation}

The density $\rho_0^\star$ which dominates the denominator of (\ref{eq:PnsRatioPathInt}) is the well known Mar\v{c}enko-Pastur distribution \cite{MP67}~:
\begin{equation}
    \label{eq:MarcenkoPastur}
	\rho_0^\star(x) = \frac{1}{2\pi x} \sqrt{(x-x_-)(x_+ - x)}
	\:,
	\hspace{1cm}
	x_{\pm} = 3 \pm 2 \sqrt{2}
	\:.
\end{equation}
This density can be obtained from (\ref{eq:rhoSpl}) by taking the limit $\mu_1 \to 0+$, which corresponds to $c-b \to 0$.

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.6\textwidth]{Rho_split}
	\caption{\it
	 Optimal density $\rho^\star$ (solid line), for $f(x)=1/x$, compared to the density $\rho_0^\star$ (dashed).
	 The shaded area correspond the fraction $\kappa$ of the largest eigenvalues.
	 The support of the density $\rho^\star$ is $[a,b]\cup[c,d]$.
	  }
	\label{fig:RhoSplit}
\end{figure}

This derivation is valid when only the largest eigenvalues contribute to $s$. This is the case as long as the gap between the two intervals of the support of $\rho^\star$ is non-zero.
The limit of validity is therefore given by $b=c$, which corresponds to $\mu_1 = 0$. The distribution is then $\rho_0^\star$, thus Eq.~(\ref{eq:RhoCond4}) gives the value of $s$~:
\begin{equation}
	s_0(\kappa) = \int_{c_0}^{x_+} \rho_0^\star(x) f(x) \dd x
	\:,
\end{equation}
where $c_0$ is fixed by
\begin{equation}
	\kappa = \int_{c_0}^{x_+} \rho_0^\star(x) \dd x
	\:.
	\label{eq:constKc0}
\end{equation}
Solving the second equation for $c_0$ and plugging the result into the first equation gives the maximal value $s_0(\kappa)$ allowed for $s$. This defines a line $s = s_0(\kappa)$ in the $(\kappa,s)$ plane which delimits the region where the assumption that only the largest eigenvalues contribute to $s$ is true. This is the lower solid line in Fig.~\ref{fig:PhDiag}. Exactly on this line, the density of eigenvalues is the Mar\v{c}enko-Pastur distribution $\rho_0^\star$.

\subsection{Tail $s \to 0$}

For $f(x)=1/x$, the limit $s \to 0$, corresponds to push the fraction $\kappa$ of the rightmost eigenvalues towards infinity. This means to let $d > c \to \infty$ in the previous equations. Expanding Eqs.~(\ref{eq:RhoCond1},\ref{eq:RhoCond2},\ref{eq:RhoCond3},\ref{eq:RhoCond4}) in this limit yields~:
\begin{align}
	a &= 3 - 2 \sqrt{(1-\kappa)(2-\kappa)} - 2 \kappa + \mathcal{O}(\sqrt{s}) \:,\\
	b &= 3 + 2 \sqrt{(1-\kappa)(2-\kappa)} - 2 \kappa + \mathcal{O}(\sqrt{s}) \:,\\
	c &= \frac{\kappa}{s} \left(1 - \sqrt{2s} + \frac{5s}{4} + \mathcal{O}(s^{3/2}) \right) \:,\\
	d &= \frac{\kappa}{s} \left(1 + \sqrt{2s} + \frac{5s}{4} + \mathcal{O}(s^{3/2}) \right) \:,\\
	\mu_1^\star &= \frac{\kappa^2}{s^2} - \frac{3\kappa(2-\kappa)}{2s} + \mathcal{O}(s^{-1/2}) \:.
\end{align}
Using the thermodynamic identity (\ref{eq:ThermoIdCoulomb}), a simple integration of this last relation gives the behaviour of the energy, therefore of the large deviation function, for $s \to 0$~:
\begin{equation}
	\Phi_-(\kappa;s) = \mathscr{E}[\rho^\star(x;\kappa,s)] - \mathscr{E}[\rho_0^\star(x)]
		= \frac{\kappa^2}{s} + \frac{3 \kappa(2-\kappa)}{2} \ln s + \mathcal{O}(1)
	\:.
	\label{eq:LDFsZero}
\end{equation}
This expression gives the left tail of the distribution~:
\begin{equation}
	P_{N,\kappa}(s) \underset{s \to 0}{\sim}
	s^{- 3 \beta \kappa (2-\kappa) N^2/4} \: \e^{-\beta (N \kappa)^2/(2s)}
	\:.
\end{equation}
Note that we recover the tail computed in Ref.~\cite{TexMaj13} simply by setting $\kappa=1$~:
\begin{equation}
	P_{N,\kappa=1}(s) \underset{s \to 0}{\sim} s^{-3 \beta N^2/4} \: \e^{- \beta N^2/(2s)}
	\:.
\end{equation}

Interestingly, the leading term in (\ref{eq:LDFsZero}) can be obtained easily by a heuristic argument. For small $s$, the energy is dominated by the potential energy of the eigenvalues pushed to infinity. The typical value of these eigenvalues is given by $s \sim \kappa/x_\mathrm{typ}$, corresponding to $x_\mathrm{typ} \sim \kappa/s$. The energy is estimated as $\mathscr{E}[\rho^\star(x;\kappa,s)] \sim \int_c \rho^\star V \sim \kappa V(x_\mathrm{typ}) \sim \kappa^2/s$. \textsc{Qed}.

\subsection{Limit $s\to s_0(\kappa)$}

In the limit $s\to s_0(\kappa)$, the two bulks of the density $\rho^\star$ merge. Hence, it corresponds to $c-b \to 0$.
The behaviour of $\Phi_-(\kappa;s)$ for $s$ close to $s_0(\kappa)$ is obtained by expanding
Eqs.~(\ref{eq:rhoSpl},...,\ref{eq:RhoCond4})
in this limit.
A straightforward but cumbersome computation gives, for any monotonic function $f$~:
\begin{equation}
	\mu_1^\star(\kappa;s) \simeq -2 \omega_\kappa\, (s-s_0(\kappa)) \:,
\end{equation}
where
\begin{equation}
	\omega_\kappa^{-1} =
		\int_{c_0}^{x_+} \frac{\dd x}{\pi} \frac{f(x)-f(c_0)}{\sqrt{(x-x_-)(x_+-x)}}
		\Xint-_{c_0}^{x_+} \frac{\dd t}{\pi} f'(t) \frac{\sqrt{(t-x_-)(x_+-t)}}{x-t} \:,
	\label{eq:coefQuadBehav}
\end{equation}
where $c_0$ is fixed by (\ref{eq:constKc0}).
The large deviation function is deduced from the thermodynamic identity (\ref{eq:ThermoIdCoulomb})~:
\begin{equation}
	\Phi_-(\kappa;s) \simeq \omega_\kappa\, (s-s_0(\kappa))^2 \:.
	\label{eq:LDFphi0QuadMin}
\end{equation}

We have performed a numerical simulation in order to check the quadratic behaviour and the value of the coefficient $\omega_\kappa$, in the case $f(x) = 1/x$.
The energy $\mathscr{E}[\rho^\star(x;\kappa,s)]$ is computed using a Monte Carlo method, see Ref.~\cite{GraMajTex17} for details on the procedure.
Fitting the numerics must be performed with caution~:
for $\kappa=0.5$, Eq.~(\ref{eq:coefQuadBehav}) gives $\omega_{1/2} \simeq 27.1$,
however a fit of the numerical data with a purely quadratic behaviour leads to $\omega_{1/2}^\mathrm{num} \simeq 32.4$.
This apparent discrepancy is explained by the fact that \eqref{eq:LDFphi0QuadMin} is only the leading term of an expansion near $s_0(\kappa)$~:
\begin{equation}
  \label{eq:FitPoly3}
	\Phi_-(\kappa;s) \simeq \omega_\kappa\, (s-s_0(\kappa))^2 + \omega_{\kappa,3} (s-s_0(\kappa))^3 + \cdots
	\:,
\end{equation}
where the higher order term cannot be neglected in practice as it involves a large coefficient.
Indeed, fitting the numerics with both the quadratic and the cubic terms, we find
$\omega_{1/2}^\mathrm{num} \simeq 27.0 $ and $\omega_{1/2,3}^\mathrm{num}  \simeq -239$, now in excellent agreement with the prediction
(see fit in Fig.~\ref{fig:MC}).
We have checked that the accuracy on $\omega_{1/2}^\mathrm{num}$ extracted from the fit is improved by increasing the order of the polynomial used to fit the data.

Interestingly, the simulation shows that the energy is frozen $\mathscr{E}[\rho^\star(x;\kappa,s)] = \mathscr{E}[\rho_0^\star(x)]$ for $s > s_0(\kappa)$. This will be explained in the next section.

\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\textwidth]{MonteCarlo}
\caption{\it Large deviation function $\Phi_-(\kappa;s) = \mathscr{E}[\rho^\star(x;\kappa,s)] - \mathscr{E}[\rho_0^\star(x)]$ (energy of the Coulomb gas) determined by a Monte Carlo simulation for $\kappa=0.5$ and $N=1500$ (dots). The results are compared to the quadratic behavior (\ref{eq:LDFphi0QuadMin}) (dashed line) and a polynomial fit of degree 3, Eq.~\eqref{eq:FitPoly3}, (solid line).
The dashed vertical line is $s_0(\kappa)$.
}
\label{fig:MC}
\end{figure}

\section{Phase II ($s_0(\kappa) < s < s_1(\kappa)$)~: frozen Coulomb gas and fictitious fermions}
\label{sec:TypFluct}

In the previous section, we have seen that
when $s\in]0,s_0(\kappa)]$, the density $\rho^\star$ changes with $s$ while the occupation numbers $\lbrace n_i \rbrace$ remain fixed.
When $s$ reaches $s_0(\kappa)$, the density is given by the Mar\v{c}enko-Pastur distribution $\rho_0^\star$, which minimizes the energy $\mathscr{E}[\rho]$.
We now enter the domain $s > s_0(\kappa)$ where it is possible to vary $s$ by changing the occupation numbers, while keeping the density fixed.
The range of accessible values of $s$ is given by two extreme cases~: selecting either the largest eigenvalues ($s = s_0(\kappa)$) or the smallest ones (Fig.~\ref{fig:MPminmax}, right). This latter case corresponds to the value $s = s_1(\kappa)$ given by~:
\begin{equation}
	s_1(\kappa) = \int_{x_-}^{c_1} \rho_0^\star(x)f(x) \dd x
	\:,
\end{equation}
where $c_1$ is fixed by
\begin{equation}
	\kappa = \int_{x_-}^{c_1} \rho_0^\star(x) \dd x
	\:;
\end{equation}
we recall that $x_\pm=3\pm2\sqrt{2}$ are the boundaries of the support of the Mar\v{c}enko-Pastur distribution introduced above, Eq.~\eqref{eq:MarcenkoPastur}.
This defines another line in the $(\kappa,s)$ plane. It is the upper solid line shown in Fig.~\ref{fig:PhDiag}.
The two lines are simply related via the relation~:
\begin{equation}
	s_1(\kappa) = \Sc - s_0(1-\kappa) \:,
	\hspace{0.5cm}
	\text{where}
	\hspace{0.5cm}
	\Sc = \int_{x_-}^{x_+} \rho_0^\star(x) f(x) \dd x
	\:.
\end{equation}
In the Laguerre ensemble considered here, with $f(x) = 1/x$, we simply have $\Sc = 1$.

The goal of this section is to describe what occurs for $s$ between $s_0(\kappa)$ and $s_1(\kappa)$, and compute the distribution in this domain.
Note that the procedure exposed in this section is valid for a monotonic function~$f$.

\subsection{Distribution of $s$ between $s_0(\kappa)$ and $s_1(\kappa)$~: an entropic contribution}
\label{subsec:discDistEntropy}

In order to determine the distribution $P_{N,\kappa}(s)$ on the interval $[s_0(\kappa),s_1(\kappa)]$, let us go back to the multiple integrals in Eq.~(\ref{eq:PnsRatioMultInt}). For large $N$, these integrals are dominated by the set of eigenvalues $\lbrace x_i^\star \rbrace$ which minimizes the energy  $\mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace]$ given by Eq.~(\ref{eq:Ediscr}), i.e.
\begin{equation}
	\left. \derivp{\mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace]}{x_i}
	\right|_{ \lbrace x_i^\star \rbrace } = 0
	\:,
	\hspace{0.5cm}
	\forall i \in \lbrace 1, \cdots , N \rbrace
	\:.
	\label{eq:MinEdiscr}
\end{equation}
Without changing this set of eigenvalues, it is possible to construct $\binom{N}{p}$ different values, given by
\begin{equation}
	\frac{1}{N} \sum_{i=1}^{N} n_i f(x_{i}^\star)
	\:.
\end{equation}
However, several configurations may give a similar value of $s$. This shows that the distribution of $s$ comes from an entropic contribution $S(\kappa;s)$~: the same ``macroscopic'' value $s$ may be associated to many ``microscopic'' configurations $\lbrace n_i \rbrace$.
We stress that this should not be confused with the entropy $\mathscr{S}[\rho]$ defined by Eq.~(\ref{eq:Srho}). Indeed, this latter measures the loss of information when describing the set of eigenvalues $\lbrace x_i \rbrace$ by a density $\rho(x)$.
The entropy $S(\kappa;s)$ discussed here is hidden in the sums over the configurations $\lbrace n_i \rbrace$ in (\ref{eq:PnsRatioMultInt}).

It is more convenient to first compute the moment generating function, which is the Laplace transform of $P_{N,\kappa}(s)$, using standard tools from statistical physics.
In a second step, we will come back to the distribution.

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.45\textwidth]{MP_max_l}
	\includegraphics[width=0.45\textwidth]{MP_min_l}
	\caption{\it
	 Mar\v{c}enko-Pastur distribution $\rho_0^\star$, with either the largest eigenvalues selected (left), corresponding to $s=s_0(\kappa)$, or the smallest eigenvalues (right), corresponding to $s=s_1(\kappa)$.
	  }
	\label{fig:MPminmax}
\end{figure}

\subsection{Moment generating function~: mapping to free fermions}
\label{subsec:MomentsGenFct}

The moment generating function is given by the Laplace transform of $P_{N,\kappa}$~:
\begin{align}
	G_{N,\kappa}(\tilde{\beta}) &= \int e^{- \tilde{\beta} N s} P_{N,\kappa}(s) \dd s = \mean{ \exp \left( - \tilde{\beta} \sum_i n_i f(x_i^\star) \right) }	\:, \nonumber
	\\
	&= \frac{p ! (N-p)!}{N!} \sum_{ \lbrace n_i \rbrace } \prod_{i=1}^N \e^{- \tilde{\beta} n_i f(x_i^\star)}
	\,
	\delta_{\Nt,\sum_i \m_i}
	\:,
	\label{eq:defGenFun}
\end{align}
where the sum runs over the $\binom{N}{p}$ configurations $\lbrace n_i \rbrace$.
The problem of choosing $p$ eigenvalues among $N$, with the constraint that $s$ is fixed, is equivalent to placing $p$ particles on $N$ ``energy levels'' $\varepsilon_i = f(x_i^\star)$, with the constraint that the total ``energy'' is fixed.
Since an eigenvalue can be chosen only once, an ``energy level'' can host only one particle. Therefore these particles behave like $p$ fermions.
The parameters $\kappa$ and $s$ are thus related to two fundamental properties of the fermion gas~:
$$
	\kappa \leftrightarrow \text{number of fermions}
	\hspace{1cm}
	s \leftrightarrow \text{energy of the fermions}
$$
The set $\lbrace n_i \rbrace$ coincides with the occupation numbers of the energy levels~:
$n_i = 1$ if level $\varepsilon_i$ is occupied and $n_i = 0$ otherwise.

With this interpretation, (\ref{eq:defGenFun}) is simply related to the canonical partition function
\begin{equation}
	Z_{N,p}(\tilde{\beta}) = \sum_{ \lbrace n_i \rbrace } \e^{- \tilde{\beta} E_\mathrm{ferm}[\lbrace n_i \rbrace] }
		\,
		\delta_{\Nt,\sum_i \m_i}
	\hspace{0.3cm}\mbox{where}\hspace{0.3cm}
	E_\mathrm{ferm}[\lbrace n_i \rbrace] = \sum_{i=1}^N n_i \varepsilon_i
	\:,
\end{equation}
via the relation
\begin{equation}
	G_{N,\kappa}(\tilde{\beta}) = \frac{Z_{N, p}(\tilde{\beta})}{Z_{N, p}(0)}
	\:.
	\label{eq:MomParFun}
\end{equation}
The parameter $\tilde{\beta}$ now plays the role of an inverse temperature for the fermions, not to be confused with the Dyson index $\beta \in \lbrace 1, 2, 4 \rbrace$.

It is natural to introduce the grand-canonical partition function, which can be calculated straightforwardly~:
\begin{equation}
	\Xi_N(z,\tilde{\beta}) = \sum_{p = 0}^N z^{p} Z_{N,p}(\tilde{\beta})
	= \prod_{i=1}^N	 \left( 1 + z \, \e^{-\tilde{\beta} \varepsilon_i} \right)
	 \:,
\end{equation}
where $z$ is the fugacity.
For large $N$, the distribution of the eigenvalues $\lbrace x_i^\star \rbrace$ is the Mar\v{c}enko-Pastur law $\rho_0^\star$. Therefore in this limit we can write~:
\begin{align}
	\frac{1}{N} \ln \Xi_N(z,\tilde{\beta})
		&= \frac{1}{N} \sum_{i=1}^N \ln \left( 1 + z\, \e^{-\tilde{\beta} \varepsilon_i} \right) \nonumber \\
		& \simeq \int_{x_-}^{x_+} \rho_0^\star(x) \ln \left( 1 + z\, \e^{-\tilde{\beta} f(x)} \right) \dd x
	\:.
\end{align}
We can go back to the canonical partition function using the relation
\begin{equation}
	Z_{N,p}(\tilde{\beta}) = \frac{1}{2 \I \pi} \oint \frac{\Xi_N(z,\tilde{\beta})}{z^{p+1}} \dd z
	\:,
	\label{eq:CanFromGCan}
\end{equation}
where the integral runs over a contour which encloses the origin once in the counter-clockwise direction.
For large $N$, this integral can be estimated using a saddle point method. In the thermodynamic limit $N \to \infty$, this corresponds to use the equivalence between the canonical and grand-canonical ensembles through a Legendre transform. The value $z_\mathrm{can}(\kappa;s)$ of the fugacity is fixed by imposing that the mean number of fermions is $p$~:
\begin{equation}
	z \left. \derivp{\ln \Xi}{z} \right|_{z_\mathrm{can}} = p
	\hspace{0.5cm}
	\Rightarrow
	\hspace{0.5cm}
	\int_{x_-}^{x_+} \frac{\rho_0^\star(x)}{\exp(\tilde{\beta} f(x))/z_\mathrm{can} + 1} \dd x = \kappa
	\:.
	\label{eq:ConstK}
\end{equation}
Then Eq.~(\ref{eq:CanFromGCan}) yields the free energy per fermion in the thermodynamic limit~:
\begin{equation}
	F(\kappa; \tilde{\beta}) =- \lim_{N \to \infty}
	\frac{1}{N} \ln Z_{N,p}(\tilde{\beta})
	= \kappa \ln z_\mathrm{can} - \lim_{N \to \infty} \frac{1}{N} \ln \Xi_N(z_\mathrm{can},\tilde{\beta})
	\:.
\end{equation}
Note that we dropped the factor $\tilde{\beta}$ in the usual definition of the free energy for convenience.
We get~:
\begin{equation}
	F(\kappa; \tilde{\beta}) = -\int_{x_-}^{x_+} \rho_0^\star(x) \ln \left( 1 + z_\mathrm{can}(\kappa;\tilde{\beta}) \, \e^{-\tilde{\beta} f(x)} \right) \dd x
		+ \kappa \ln z_\mathrm{can}(\kappa;\tilde{\beta})
	\:.
	\label{eq:FreeE}
\end{equation}
Eq.~(\ref{eq:MomParFun}) shows that the logarithm of the moment generating function, namely the cumulant generating function, is given by the free energy of the fermions~:
\begin{equation}
	\frac{1}{N} \ln G_{N,\kappa}(\tilde{\beta}) \simeq  F(\kappa; 0) -F(\kappa; \tilde{\beta})
	\:.
	\label{eq:CumulGenFctAsymp}
\end{equation}

\subsubsection{Cumulants of the truncated linear statistics $s$, for $f(x)=1/x$}
\label{subsubsec:cumulants}

The cumulants of (\ref{eq:defTrlinstat0}) can be obtained by expanding $\ln G_{N,\kappa}$ as a power series~:
\begin{equation}
	\ln G_{N,\kappa}(\tilde{\beta}) = \sum_{n \geq 1} \mean{s^n}_c \frac{(\tilde{\beta} N)^n}{n!}
	\:.
	\label{eq:CumulGenFctExp}
\end{equation}
The procedure is as follows~: first determine $z_\mathrm{can}$ as a power series in $\tilde{\beta}$ from (\ref{eq:ConstK}). Then plug this expression into (\ref{eq:FreeE}) to get the expansion of $F$ in powers of $\tilde{\beta}$, and read the cumulants from the coefficients of this expansion.
In particular, for $f(x)=1/x$, the first six cumulants are given by~:
\begin{align}
	\mean{s} &= \kappa \:, \\
	\mean{s^2}_c &\simeq \frac{\kappa(1-\kappa)}{N} \:, \label{eq:Variance} \\
	\mean{s^3}_c &\simeq \frac{2 \kappa(1-\kappa)(1-2\kappa)}{N^2}
	\:, \\
	\mean{s^4}_c &\simeq \frac{2 \kappa(1-\kappa)(2-15\kappa+15\kappa^2)}{N^3} \label{eq:Cumul4} \:, \\
	\mean{s^5}_c &\simeq \frac{4\kappa(1-\kappa)(1-2\kappa)(1-42\kappa+42\kappa^2)}{N^4} \:, \\
	\mean{s^6}_c &\simeq -\frac{2\kappa(1-\kappa)(13 + 420\kappa -2940\kappa^2 +5040\kappa^3 - 2520\kappa^4)}{N^5} \label{eq:Cumul6}
	\:.
\end{align}
The first two cumulants coincide with those obtained before, Eqs.~(\ref{eq:MeanS},\ref{eq:VarS}), as it should.

In addition, we have performed an orthogonal polynomial calculation in the case $\beta=2$ \cite{Meh04}.
This provides another check of our expressions as we have obtained that the first four cumulants given by this second method perfectly match the above expressions.

We also stress the $\kappa\leftrightarrow 1-\kappa$ symmetry of the cumulants:
under this change, the even order cumulants are unchanged, while the odd ones change sign.
Consequently, for $\kappa = 1/2$, all odd order cumulants vanish: the distribution is symmetric around its mean $s=1/2$.
This can be understood as the symmetry between fermions and holes.

It is interesting to compare these cumulants with the cumulants of the Wigner time delay \cite{CunMezSimViv16}, corresponding to $\kappa=1$~:
\begin{align}
	\mean{s^2}_c &\simeq \frac{4}{\beta N^2} \:, \\
	\mean{s^3}_c &\simeq \frac{96}{\beta^2 N^4}
	\:, \\
	\mean{s^4}_c &\simeq \frac{5088}{\beta^3 N^6} \:, \\
	\mean{s^5}_c &\simeq \frac{437760}{\beta^4 N^8}
	\:,
\end{align}
(the variance was also found in \cite{LehSavSokSom95,BroBut97,TexMaj13}~; Ref.~\cite{MezSim13} has given the four first cumulants explicitly).

The vanishing of the cumulants (\ref{eq:Variance},...,\ref{eq:Cumul6}) for $\kappa=1$ can be straightforwardly understood from the fermionic nature of the problem~: when $p = N$, the occupation numbers are all equal to one, and therefore do not fluctuate.
However, (\ref{eq:Variance},...,\ref{eq:Cumul6}) correspond to the dominant terms of expansions in powers of $1/N$. When $\kappa=1$ the leading terms vanish, and only subleading contributions remain.
This explains why the cumulants do no present the same scaling with $N$~:
$$
  \mean{s^n}_c \sim N^{-n+1} \mbox{ for }\kappa < 1
  \hspace{0.5cm}\mbox{\textit{versus}}\hspace{0.5cm}
  \mean{s^n}_c \sim \beta^{-n+1} N^{-2n+2}  \mbox{ for }\kappa=1
  \:.
$$
The fluctuations are much larger when $\kappa < 1$.
This observation on the scaling of the moments has a simple interpretation~:
the energy of the $N$ interacting particles scales as $N^2 \mathcal{E}_\mathrm{gas} \sim N^2$ due to the long range nature of the interaction, and the entropy of the $p$ fictitious fermions scales as $N S \sim N$.
In usual studies of linear statistics, the energy dominates, and the entropy $S$ is zero because all the occupation numbers are fixed to $n_i = 1$. Hence the fluctuations scale as $\delta s \sim 1/N$. But here, for $\kappa<1$, the energy is frozen and the additional entropy dominates. Therefore the fluctuations scale as $\delta s \sim 1/\sqrt{N}$.

This interpretation also explains why the cumulants do not depend on the Dyson index $\beta$ when $\kappa<1$~: this index is present in the  Gibbs measure $\exp[-(\beta/2)N^2\mathcal{E}_\mathrm{gas}]$, but not in the measure of entropic nature $\exp[NS]$ (as stressed in \S~\ref{subsec:discDistEntropy}, the entropy of the fermions should not be confused with the entropy of the density of the Coulomb gas).

\subsubsection{Numerics}
\label{subsec:numerics}

We have also performed numerical simulations to check our results.
Figure \ref{fig:HistNum} shows histograms obtained
by diagonalizing $200\,000$ complex Hermitian matrices ($\beta = 2$) of various sizes.
These histograms are compared to the approximate distribution reconstructed using a Edgeworth series, from the large $N$ expressions of the cumulants (\ref{eq:Variance},...,\ref{eq:Cumul4}).
On purpose, we first consider rather small matrices, of size $N=20$ (Fig.~\ref{fig:HistNum}, left)~: we can see a significant deviation, which we mostly attribute to the large $N$ approximation of the cumulants.
For still moderate size $N=40$ (Fig.~\ref{fig:HistNum}, right), we see that the agreement is already very good.
The plots of Figure~\ref{fig:HistNum} correspond to $\kappa=0.25$.
Note that, increasing $\kappa$ with fixed $N$, we have observed that the agreement becomes less good, although cumulants are symmetric under $\kappa\leftrightarrow1-\kappa$ at leading order in $N$~; this is explained by the fact that finite $N$ corrections increase with $\kappa$, cf. Eq.~\eqref{eq:VarS}.
We have also performed the calculation up to $N=100$ where the histogram is almost indistinguishable from the simple Gaussian approximation.

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.45\textwidth]{Hist_N20_p5}
	\hfill
	\includegraphics[width=0.45\textwidth]{Hist_N40_p10}
	\caption{\it
	Histogram of $P_{N,\kappa}(s)$, for $f(x)=1/x$,  obtained from $200\,000$ complex matrices ($\beta=2$) of various sizes, for $\kappa = 0.25$.
	The lines correspond to a reconstruction of the distribution using a Edgeworth series, using the first two (dashed) and four (solid) asymptotic forms of the cumulants.
	  }
	\label{fig:HistNum}
\end{figure}

\subsection{Large deviations~: fermions with positive or negative absolute temperature}
\label{subsec:ldfFermionsFD}

The distribution of the truncated linear statistics (\ref{eq:defTrlinstat0}) can be obtained in the interval $[s_0(\kappa), s_1(\kappa)]$ by Laplace inversion~:
\begin{equation}
	P_{N,\kappa}(s) = \frac{N}{2 \I \pi} \int_{\I \mathbb{R}} \e^{N \tilde{\beta} s} G_{N,\kappa}(\tilde{\beta}) \dd \tilde{\beta}
	\:.
\end{equation}
For large $N$, we can estimate this integral with a saddle point method. This corresponds to performing another Legendre transform on the free energy $F$.
In section \ref{subsec:MomentsGenFct} we already performed a Legendre transform to go from grand-canonical to canonical ensemble. Thus, here we perform a second one to reach the microcanonical ensemble where the energy (i.e. $s$) and the fermion number (i.e. $\kappa$) are fixed.

Using (\ref{eq:CumulGenFctAsymp}) for the expression of $G_{N,p}$, we obtain that the saddle point $\t_\mathrm{mic}(\kappa;s)$ is given by
\begin{equation}
	\left. \deriv{}{\tilde{\beta}} F(\kappa;\tilde{\beta}) \right|_{\t_\mathrm{mic}} - s = 0
	\:.
	\label{eq:SaddleLDF}
\end{equation}
Using the expression of $F$, this equation reads~:
\begin{equation}
	\int_{x_-}^{x_+} \frac{\rho_0^\star(x)}{\exp(\t_\mathrm{mic} f(x))/z_\mathrm{mic} + 1} f(x) \dd x= s \:,
	\label{eq:ConstSldf}
\end{equation}
where we denoted $z_\mathrm{mic}(\kappa;s) = z_\mathrm{can}(\kappa; \t_\mathrm{mic}(\kappa;s))$.
Then the distribution becomes~:
\begin{equation}
    \boxed{
	P_{N,\kappa}(s)
	  \underset{N\to\infty}{\sim}
		\exp \left\lbrace
				- N \Phi_0(\kappa;s)
			\right\rbrace
	\hspace{0.5cm}
	\text{for}
	\hspace{0.5cm}
	 s \in [s_0(\kappa),s_1(\kappa)]
	}

	\label{eq:PnsPhi0}
\end{equation}
where we introduced the large deviation function $\Phi_0$, which is given by~:
\begin{equation}
	\Phi_0(\kappa;s) = F(\kappa; \t_\mathrm{mic}(\kappa;s)) - s \t_\mathrm{mic}(\kappa;s) - F(\kappa;0)
	\:.
	\label{eq:Phi0Fsbeta}
\end{equation}
Explicitly, it reads~:
\begin{align}
	\Phi_0(\kappa;s) = \kappa \ln z_\mathrm{mic}(\kappa;s) 	\nonumber
	&- \int_{x_-}^{x_+} \rho_0^\star(x) \ln \left( 1 + z_\mathrm{mic}(\kappa;s) \e^{-\t_\mathrm{mic}(\kappa;s)f(x)} \right) \dd x
	\\
	& - s \t_\mathrm{mic}(\kappa;s)
		- \kappa \ln \kappa - (1-\kappa) \ln (1-\kappa)
	\:,
	\label{eq:LdfPhi0}
\end{align}
where $\t_\mathrm{mic}$ and $z_\mathrm{mic}$ are fixed by Eq.~(\ref{eq:ConstSldf}) and
\begin{equation}
	\int_{x_-}^{x_+} \frac{\rho_0^\star(x)}{\exp(\t_\mathrm{mic} f(x))/z_\mathrm{mic} + 1} \dd x= \kappa \:.
	\label{eq:ConstKm}
\end{equation}

The observations we made earlier discussing the cumulants are also valid for the full distribution of $s$, Eqs.~(\ref{eq:PnsPhi0},\ref{eq:LdfPhi0}). For $s \in [s_0(\kappa),s_1(\kappa)]$ the distribution $P_{N,\kappa}(s)$ does not depend on the Dyson index $\beta$. Moreover, the logarithm of the probability scales as $N$ whereas it scales as $N^2$ for $s < s_0(\kappa)$, indicating a distribution of width $\sim1/\sqrt{N}$, much broader that $1/N$ for $\kappa=1$.

The physical interpretation of $\Phi_0$ is made clear by Eq.~(\ref{eq:Phi0Fsbeta})~: $s$ is the energy of the fermions, $F$ their free energy (up to a factor $\tilde{\beta}$) and $\t_\mathrm{mic}$ is the inverse temperature. Therefore, $\Phi_0$ is a difference of entropy~:
\begin{equation}
	\Phi_0(\kappa;s) = S(\kappa; s^\star) -  S(\kappa; s)
	\:,
	\label{eq:Phi0DiffEntropy}
\end{equation}
where $S = \tilde{\beta} s - F$ is the entropy of the $p = \kappa N$ fermions with total energy $s$. The condition $\t_\mathrm{mic}(\kappa;s^\star) = 0$ determines $s^\star$. The term $S(\kappa; s^\star)$ comes from the normalization of $P_{N,\kappa}(s)$, namely the denominator in Eq.~(\ref{eq:PnsRatioMultInt}).
In particular, the number of configurations $\lbrace n_i \rbrace$ associated to the value $s$ is exactly $\exp[N\, S(\kappa;s)]$.

The values of the inverse temperature $\t_\mathrm{mic}$ and the fugacity $z_\mathrm{mic}$ are obtained in terms of $\kappa$ and $s$ by Eqs.~(\ref{eq:ConstSldf},\ref{eq:ConstKm}). This corresponds to summing over all the eigenvalues (equivalently, the energy levels), with a weight given by the Fermi-Dirac distribution
\begin{equation}
	\mean{n_i} = \frac{1}{\exp(\tilde{\beta} f(x_i))/z + 1}
	\:.
	\label{eq:FermiDirac}
\end{equation}
In addition, the eigenvalues are distributed according to the optimal distribution in the absence of constraint,
i.e. the Mar\v{c}enko-Pastur distribution $\rho_0^\star$.

Note that the parameter $\tilde{\beta}$, which represents the inverse temperature of the fermions, can be either positive or negative. This quite unusual situation occurs because the spectrum $\lbrace \varepsilon_i = f(x_i^\star) \rbrace$ is bounded from below and above.
The Fermi-Dirac distribution (\ref{eq:FermiDirac}) interpolates between two step-functions~: in the limit $\tilde{\beta} \to + \infty$, it selects only the lowest energy levels (in our case, the largest eigenvalues
since $f$ is decreasing, as shown in Fig \ref{fig:MPminmaxFD}, left). The opposite limit $\tilde{\beta} \to -\infty$ corresponds to select only the highest energy levels (smallest eigenvalues, see Fig \ref{fig:MPminmaxFD}, right).

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.45\textwidth]{MP_max_FD}
	\includegraphics[width=0.45\textwidth]{MP_min_FD}
	\caption{\it
	 Fermi-Dirac distribution (\ref{eq:FermiDirac}) in the case $f(x)=1/x$, for $\tilde{\beta} > 0$ (left) and $\tilde{\beta} < 0$ (right), superimposed to the eigenvalue distribution $\rho_0^\star$. Shaded areas indicate the contribution of the eigenvalues to the linear statistics.
	 Note that the case $\tilde{\beta} > 0$ corresponds to select the largest eigenvalues, hence the smallest ``energies'' $\varepsilon_n = f(x_n) = 1/x_n$, as usual.
	  }
	\label{fig:MPminmaxFD}
\end{figure}

The derivation we followed in this section can be generalized straightforwardly to other matrix ensembles. For example in the Gaussian ensemble, one should replace the Mar\v{c}enko-Pastur distribution $\rho_0^\star$ by the Wigner semicircle law.
Because the density is given by the density obtained in the absence of constraint, the scenario described here is completely universal and valid for any monotonic function~$f$ (the case of $f$ non monotonic is discussed in Section~\ref{subsec:OpenQuestions}).

\subsubsection{Expansion around the typical value~: infinite temperature ($\tilde{\beta} \to 0^{\pm}$)}

The large deviation function $\Phi_0$ being obtained from a saddle point estimate, Eq.~(\ref{eq:SaddleLDF}) can be used to prove an identity similar to (\ref{eq:ThermoIdCoulomb})~:
\begin{equation}
   \boxed{
	\deriv{S(\kappa;s)}{s} =  \t_\mathrm{mic}(\kappa;s)
	}

	\label{eq:ThermoIdPhi0}
\end{equation}
From this relation, it is clear that the maximum of $S$ (minimum of $\Phi_0$) is given by $\t_\mathrm{mic} = 0$, corresponding to $s = \kappa$.
This means an infinite temperature for the fermions~: the Fermi-Dirac distribution (\ref{eq:FermiDirac}) is flat, and all the energy levels are occupied with probability $p/N$.
Expanding Eqs.~(\ref{eq:ConstSldf},\ref{eq:ConstKm}) for $\tilde{\beta}$ near $0$ allows to compute $\t_\mathrm{mic}$ near $s = \kappa $. In the case $f(x)=1/x$, this gives~:
\begin{equation}
	\t_\mathrm{mic}(\kappa;s) \simeq - \frac{s-\kappa}{\kappa(1-\kappa)}
	\:.
\end{equation}
Using (\ref{eq:Phi0DiffEntropy},\ref{eq:ThermoIdPhi0}), we obtain~:
\begin{equation}
  \label{eq:Phi0closeToKappa}
	\Phi_0(\kappa;s) \simeq \frac{(s-\kappa)^2}{2 \kappa(1-\kappa)} \:,
	\hspace{0.5cm}
	\text{for } s \to \kappa \:.
\end{equation}
As we have already seen, the distribution $P_{N,\kappa}(s)$ is dominated by a Gaussian peak located at $s=\kappa$, with variance given by (\ref{eq:Variance}).
This expression of $\Phi_0$ is singular when $\kappa = 1$. But as we discussed in section \ref{subsubsec:cumulants}, this corresponds only to the leading term of an expansion in powers of $1/N$ of the variance.
Eq.~\eqref{eq:VarS} shows that the distribtuion is regular for $\kappa\to1$~:
\begin{equation}
	-\frac{1}{N}\ln P_{N,\kappa} (s)
	\underset{s\sim\kappa}{\simeq}
	\frac{(s-\kappa)^2}{ \displaystyle
	2 \left[ \kappa(1-\kappa)
	+ \frac{4\kappa}{\beta N} \left(1 - \beta \frac{(1-\kappa)}{4} \right)
	+ \mathcal{O}(N^{-2}) \right]} \:.
\end{equation}
This expression describes correctly the limit $\kappa \to 1$ for $s$ close to $\kappa$
and account for the transition between fluctuations $\sim1/\sqrt{N}$ for $\kappa<1$ and fluctuations $\sim1/N$ for $\kappa=1$ (the crossover between the two regimes obviously occurs at $1-\kappa\sim1/{\beta N}$).

\subsubsection{Limiting behaviours at the edges: zero temperature ($\tilde{\beta} \to \pm \infty$)}

The limits $s \to s_0(\kappa)$ and $s \to s_1(\kappa)$ correspond to the inverse temperature $\t_\mathrm{mic} \to + \infty$ and $\t_\mathrm{mic} \to -\infty$, respectively.
This means zero temperature for the fermions~: the Fermi-Dirac distribution (\ref{eq:FermiDirac}) becomes a step function, selecting either the largest or the smallest eigenvalues, as shown in Fig.~\ref{fig:MPminmaxFD}.
Therefore, Eqs.~(\ref{eq:ConstSldf},\ref{eq:ConstKm}) involving integrals of this distribution can be approximated via a standard Sommerfeld expansion \cite{PatBea11,TexRou17book}~: for any function $H$ and fixed chemical potential $\mu$, one has
\begin{equation}
	\int \frac{H(\varepsilon) \dd \varepsilon}{\e^{\tilde{\beta}(\varepsilon - \mu)} + 1}
		= \int_{-\infty}^\mu H(\varepsilon) \dd \epsilon
		+ \frac{1}{\tilde{\beta}^2} \frac{\pi^2}{6} H'(\mu) + \mathcal{O}(\tilde{\beta}^{-4})
	\text{ for } \tilde{\beta} \to +\infty
	\:,
	\label{eq:Sommerfeld}
\end{equation}
and a similar expression holds for $\tilde{\beta} \to -\infty$.
In our case, since $\varepsilon= f(x) = 1/x$, it is convenient to introduce $l = 1/\mu$, which delimits the domain of the spectrum of eigenvalues which is ``occupied'', as shown in Fig.~\ref{fig:MPminmax}. The fugacity is simply related to the chemical potential $\mu$ by $z_\mathrm{mic} = \e^{\t_\mathrm{mic} \mu} = \e^{\t_\mathrm{mic}/l}$.

For $\t_\mathrm{mic} \to + \infty$ (corresponding to $s \to s_0(\kappa)$), Eq.~(\ref{eq:ConstKm}) allows to compute $l$ as a power series $l = l_0 + l_1 \t_\mathrm{mic}^{-2} + \mathcal{O}(\t_\mathrm{mic}^{-4})$ using the Sommerfeld expansion (\ref{eq:Sommerfeld}). This gives
\begin{equation}
	\int_{l_0}^{x_+} \rho_0^\star(x) \dd x = \kappa
	\hspace{0.5cm}
	\text{and}
	\hspace{0.5cm}
	l_1 = \frac{ l_0^3 \pi^2 }{6} \left(
			2 + l_0 \frac{\rho_0^\star{}'(l_0)}{\rho_0^\star{}(l_0)}
		\right)
	\:.
\end{equation}
Then, following the same procedure with Eq.~(\ref{eq:ConstSldf}) yields
\begin{equation}
	s = s_0(\kappa) + \frac{1}{\t_\mathrm{mic}^2} \frac{\pi^2 l_0^2 \rho_0^\star(l_0)}{6}
		+ \mathcal{O}(\t_\mathrm{mic}^{-4})
	\:,
\end{equation}
thus
\begin{equation}
	\t_\mathrm{mic} \simeq \pi l_0 \sqrt{\frac{\rho_0^\star(l_0)}{6 (s - s_{0}(\kappa)) }}
		\quad \text{as} \quad
	s \to s_{0}(\kappa)
	\:.
\end{equation}
A similar computation allows to estimate the integral in Eq.~(\ref{eq:LdfPhi0}). Finally, we obtain~:
\begin{equation}
  \label{eq:LimitingBehaviour344}
	\Phi_0(\kappa;s) \underset{s \to s_0}{\simeq}
	     C_\kappa
		- \pi l_0 \sqrt{\frac{2}{3} \rho_0^\star(l_0) (s - s_{0}(\kappa)) }
	\:,
\end{equation}
where $C_\kappa=-\kappa \ln \kappa - (1-\kappa) \ln (1-\kappa)>0$.
The case $\t_\mathrm{mic} \to -\infty$ (corresponding to $s \to s_1(\kappa)$) can be treated in the same way. We obtain~:
\begin{equation}
  \label{eq:Phi0closeToS1}
	\Phi_0(\kappa;s) \underset{s \to s_1}{\simeq}
	  C_\kappa
		- \pi \tilde{l}_0 \sqrt{\frac{2}{3} \rho_0^\star(\tilde{l}_0) (s_{1}(\kappa) - s) }
	\:,
\end{equation}
where $\tilde{l}_0$ is now fixed by
\begin{equation}
	\int_{x_-}^{\tilde{l}_0} \rho_0^\star(x) \dd x = \kappa \:.
\end{equation}

\begin{figure}[!ht]
	\centering
	\includegraphics[width=0.7\textwidth]{Ldf_k05_07}
	\caption{\it
	 Large deviation function $\Phi_0$ (entropy of the fermions) describing in particular the typical fluctuations of the truncated linear statistics.
	 The cases $\kappa=0.5$ and $\kappa=0.7$ are both represented.
	 The dashed horizontal lines delimit the maximum $-\kappa \ln \kappa - (1-\kappa) \ln (1-\kappa)$ of these functions.
	 }
	\label{fig:LDFAsympt}
\end{figure}

Note that $\Phi_0$ reaches its maximal value $C_\kappa$ for $s = s_{0}(\kappa)$ and $s_1(\kappa)$. This particular value has a very simple meaning~: $P_{N,\kappa}(s)$ is the (normalized) number of configurations among the $\binom{N}{p}$ which give the value $s$. For $s = s_{0}(\kappa)$ or $s_1(\kappa)$, only one configuration exists, corresponding either to selecting the largest or the smallest eigenvalues. Therefore, $P_{N,\kappa}(s_{0}(\kappa)) \simeq 1/\binom{N}{p}$. In the large $N$ limit,
\begin{equation}
	-\frac{1}{N} \ln P_{N,\kappa}(s_{0}(\kappa)) \simeq \frac{1}{N} \ln \binom{N}{p}
		\simeq-\kappa \ln \kappa - (1-\kappa) \ln (1-\kappa)
		\equiv  C_\kappa
	\:,
	\label{eq:447}
\end{equation}
and similarly for $s_1(\kappa)$.
The function $\Phi_0(\kappa;s)$ is plotted in Fig.~\ref{fig:LDFAsympt}.

\section{Phase III ($s>s_1(\kappa)$)~: mixed picture}
\label{sec:LDFlarge}

The distribution of the truncated linear statistics (\ref{eq:defTrlinstat0}) for $s < s_1(\kappa)$ was determined by considering two different situations.
First, for $s < s_0(\kappa)$, the fraction $\kappa$ of the largest eigenvalues detach from the others, as we have seen in section \ref{sec:Coulombgas}. When $s$ is increased, these two bulks of eigenvalues move closer, until they merge for $s = s_0(\kappa)$ (Fig.~\ref{fig:MPminmax}, left). Then, when $s$ is further increased in the interval $[s_0(\kappa),s_1(\kappa)]$, the density of eigenvalues is frozen and the occupation numbers $\lbrace n_i \rbrace$ fluctuate, as it was shown in section \ref{sec:TypFluct}. When $s$ reaches $s_1(\kappa)$, these occupation numbers no longer fluctuate and only the smallest eigenvalues are selected (Fig.~\ref{fig:MPminmax}, right).

In the domain $s > s_1(\kappa)$ we could naively expect a similar scenario as for the tail $s \to 0$, namely to detach the fraction $\kappa$ of the smallest eigenvalues.
However, in the case $f(x) = 1/x$, there is another scenario more favorable energetically.
It is enough to detach one eigenvalue (the smallest, $x_N$) to obtain large values of $s$~:
a ``bulk'' of $N-1$ eigenvalues can remain frozen while only one eigenvalue contributes to the $s$-dependent part of the energy, which thus scales as $\sim N$ instead of $\sim N^2$ as in Phase~I.
We write
\begin{equation}
	s = \frac{1}{N x_N} + \frac{1}{N} \sum_{i=1}^{N-1} \frac{n_i}{x_i}
	\:.
	\label{eq:sSplitCharge}
\end{equation}
If the smallest eigenvalue $x_N$ scales as $N^{-1}$, it gives a ``macroscopic'' contribution of the same order as the other $N-1$ eigenvalues which
remain of order $N^0$.
Because $x_N$ is much smaller that the other eigenvalues in the limit $N \to \infty$,
the constraint $x_N < x_{N-1}$ in the multiple integrals \eqref{eq:PnsRatioMultInt} (for $f(\lambda)=1/\lambda$) plays no role.
We estimate the integral over $\lbrace x_1, \cdots, x_{N-1} \rbrace$ with a saddle point method. The saddle point denoted $\lbrace x_i^\star \rbrace$, corresponds to the minimum of the energy $ \mathcal{E}_\mathrm{gas}[\lbrace x_i \rbrace]$, Eq.~(\ref{eq:MinEdiscr}). Thus, these eigenvalues are frozen and distributed according to the Mar\v{c}enko-Pastur density $\rho_0^\star$. The corresponding energy is~:
\begin{equation}
	\mathcal{E}_\mathrm{gas}[\lbrace x_1^\star, \cdots x_{N-1}^\star, x_N \rbrace] \simeq
		\mathscr{E}[\rho_0^\star]
		- \frac{1}{N} \ln x_N
		+ \frac{\mathscr{C}}{N}
	\:,
\end{equation}
where the constant $\mathscr{C} = -1 - 2 \ln 2$ arises from a careful treatment of $1/N$ corrections~\cite{GraMajTexUnp}.
Taking into account the contribution of the denominator in \eqref{eq:PnsRatioMultInt},
we obtain~:
\begin{equation}
	P_{N,\kappa}(s) \sim
		\sum_{ \lbrace n_i \rbrace }
		 \int \dd x_N \,
			\e^{\frac{\beta N}{2} (\ln x_N - \mathscr{C}) }
		\delta \left(
			s - \frac{1}{N x_N} - \frac{1}{N} \sum_{i=1}^{N-1} \frac{n_i}{x_i^\star}
		\right)
		\,
		\delta_{\Nt,\sum_i \m_i}
  		\:.
\end{equation}
Note that the substitution \eqref{eq:MeasurePathInt} in the multiple integrals in \eqref{eq:PnsRatioMultInt} give contributions of the entropy of the Coulomb gas $(1-\beta/2)\mathscr{S}[\rho]$ also of order $N^1$, however the leading term of such contributions are the same in the numerator and the denominator and thus cancel.
Integration over the last eigenvalue is straightforward~:
\begin{equation}
	P_{N,\kappa}(s) \sim
		\sum_{\lbrace n_i \rbrace } \exp \left\lbrace
			-\frac{\beta N}{2}
				\left[
				\ln \left(
				N s - \sum_{i=1}^{N-1} \frac{n_i}{x_i^\star}
			\right)
			+ \mathscr{C} \right]
		\right\rbrace
		\delta_{\Nt,\sum_i \m_i}
	\:.
\end{equation}
In order to compute this sum, let us rewrite it as
\begin{equation}
	P_{N,\kappa}(s) \sim
		\int \dd u \:
			\e^{-\frac{\beta N}{2} (\ln [N(s - u)] + \mathscr{C} )}
		\sum_{\lbrace n_i \rbrace }
			\delta \left(
				u - \frac{1}{N} \sum_{i=1}^{N-1} \frac{n_i}{x_i^\star}
			\right)
		\delta_{\Nt,\sum_i \m_i}
	\:.
	\label{eq:PnsLargeSum}
\end{equation}
We now recognize the distribution of $s$ computed in section \ref{sec:TypFluct}~:
\begin{equation}
	\sum_{\lbrace n_i \rbrace }
			\delta \left(
				u - \frac{1}{N} \sum_{i=1}^{N-1} \frac{n_i}{x_i^\star}
			\right)
		\delta_{\Nt,\sum_i \m_i}
		\sim e^{- N \Phi_0(\kappa;u)}
	\:,
\end{equation}
where $\Phi_0$ is given by (\ref{eq:LdfPhi0}). Therefore, (\ref{eq:PnsLargeSum}) reduces to
\begin{equation}
	P_{N,\kappa}(s) \sim \int \dd u \:
		\exp \left\lbrace -\frac{\beta N}{2} ( \ln [N(s - u)] + \mathscr{C} ) - N \Phi_0(\kappa;u)
			\right\rbrace
	\:.
\end{equation}
This last integral can be computed using a saddle point method. The saddle point $\tilde{s}(s)$ is given by~:
\begin{equation}
	\frac{\beta}{2} \frac{1}{\tilde{s} - s}
		+ \left. \deriv{\Phi_0(\kappa;u)}{u} \right|_{\tilde{s}(s)}
		= 0
	\:.
	\label{eq:SaddlePtSepCharge}
\end{equation}
The quantity $\tilde{s}$ represents the contribution of the frozen bulk to the TLS. Its limiting behaviours are found by using \eqref{eq:Phi0closeToKappa} and \eqref{eq:Phi0closeToS1}, where the latter is rewritten $\Phi_0(\kappa;s)\simeq C_\kappa-\tilde{c}_+\sqrt{s_1(\kappa)-s}$.
Some elementary algebra gives
\begin{equation}
  \label{eq:LimitsStilde}
  \tilde{s}(s) \simeq
  \begin{cases}
    s_1(\kappa) - \left(\frac{\tilde{c}_+}{\beta}\right)^2 (s-s_1(\kappa))^2 & \mbox{for } s\to s_1(\kappa)^+
    \\[0.25cm]
    \kappa + \frac{\beta\kappa(1-\kappa)}{2(s-\kappa)} + \mathcal{O}(s^{-3})
      & \mbox{for } s\to\infty
  \end{cases}
\end{equation}

Finally, the probability is given by~:
\begin{equation}
   \boxed{
	P_{N,\kappa}(s)
	  \underset{N\to\infty}{\sim}
	N^{-\beta N/2}
	\exp \left\lbrace
		- N \left[\frac{\beta}{2} \Phi_+(\kappa;s) + \Phi_0(\kappa,\tilde{s}(s)) \right]
	\right\rbrace
	\hspace{0.25cm}
	\text{for}
	\hspace{0.25cm}
	 s > s_1(\kappa)
    }

\end{equation}
where the large deviation function is
\begin{equation}
	\Phi_+(\kappa;s) = N( \mathcal{E}_\mathrm{gas}[\lbrace x_n \rbrace] - \mathcal{E}[\rho_0^\star(x)])
			-\ln N
			= \ln (s - \tilde{s}(s))  +\mathscr{C}
		\:,
\end{equation}
where $\mathscr{C}=- 1 - 2 \ln 2$.
There are two different contributions to the distribution of $s$:
\begin{itemize}
	\item the energy of the isolated eigenvalue $x_N$, encoded in $\Phi_+$;
	\item the entropy associated to the possible configurations $\lbrace n_i \rbrace$ associated to the $N-1$ frozen eigenvalues, encoded in $\Phi_0$.
\end{itemize}
The latter was not present in the case $\kappa=1$ studied in Ref.~\cite{TexMaj13} because all the occupation numbers were fixed to $n_i = 1$ and do not bring any additional entropy.

\subsection{Behaviour near the edge $s_1(\kappa)$}

Using \eqref{eq:LimitsStilde}, $\tilde{s} \simeq s_1(\kappa)$, gives
\begin{equation}
	\Phi_+(\kappa;s) \simeq \ln(s - s_1(\kappa) )+ \mathrm{cste}
	\:,
\end{equation}
and
\begin{equation}
	\Phi_0(\kappa; \tilde{s}(s)) \to  C_\kappa

	\:,
\end{equation}
where $C_\kappa>0$ was defined in Eq.~\eqref{eq:447}.
Therefore, the leading order term
\begin{equation}
	\Phi_+(\kappa;s) + \frac{2}{\beta} \Phi_0(\kappa;\tilde{s}(s))
	\simeq
	 \ln (s - s_1(\kappa))
	 + \mathrm{cste}
	\quad
	\text{for}
	\quad
	s \to s_1(\kappa)
\end{equation}
is independent of the Dyson index $\beta$, which only appears in the constant.

\subsection{Tail $s \to \infty$}

The limiting behaviour \eqref{eq:LimitsStilde}, $\tilde{s} \simeq \kappa$, shows that the entropy no longer plays a role and the contribution of the energy reads~:
\begin{equation}
	\Phi_+(\kappa;s) \simeq \ln(s - \kappa)  + \mathcal{O}(s^{-2})
	\:,
	\hspace{0.5cm}
	\text{for } s \to \infty
	\:,
\end{equation}
which is again independent of $\beta$.
This gives the right tail of the distribution~:
\begin{equation}
	P_{N,\kappa}(s) \underset{s \to \infty}{\sim} s^{-\beta N/2}
	\:.
\end{equation}
We have recovered the tail obtained in Ref.~\cite{TexMaj13} for $\kappa=1$~: $P_{N,1}(s) \sim (s-1)^{-\beta N/2}$ for $s-1 \gg \sqrt{\ln N/N}$, as expected since this limit is described within the same scenario (one isolated charge and a frozen bulk).
From the physical point of view, this power law tail is interpreted as the manifestation of a very narrow resonance which dominates the sum of proper times.

\section{Conclusion}
\label{sec:Conclusion}

\subsection{A new universal scenario}

As briefly reviewed in the introduction, the study of linear statistics has played a very important role in random matrix theory.
In this article we have introduced a new type of question by considering the statistical analysis of partial sums of eigenvalues $\sum_{i=1}^p f(\lambda_i)$, so-called ``\textit{truncated linear statistics}'' (TLS), with $\kappa=p/N<1$, where $N$ is the size of the matrices.
This question has been set within the Laguerre ensemble for $f(\lambda)=1/\lambda$.
The study of this particular model was motivated by the analysis of partial sums of proper time delays in chaotic scattering, which are characteristic times of the scattering process playing an important role in electronic transport.

The specificity of the problem has led us to introduce two sets of random variables, the ordered eigenvalues $\lambda_1>\lambda_2>\cdots>\lambda_N$ and the ``occupation numbers'' $\{n_i\}_{i=1,\cdots,N}$, with $n_i=0$ or $1$, leading to express the TLS as $s=\sum_{i=1}^Nn_i\,f(\lambda_i)$.
Correspondingly, we have introduced two different physical interpretations~:
\begin{itemize}
\item
  the eigenvalues $\{\lambda_i\}$ can be interpreted as the positions of a one-dimen\-sio\-nal gas of particles with long range (logarithmic) interactions, as usual in such problems.
\item
  The variables $\{n_i\}$ can be viewed as occupation numbers for $p$ fictitious non-interacting fermions in $N$ ``energy levels'' $\{ \varepsilon_i=f(\lambda_i) \}$.
\end{itemize}
We have determined the large $N$ behaviour of the distribution $P_{N,\kappa} (s)$ of the TLS,~\footnote{
  The numerical analysis of \S~\ref{subsec:numerics} has shown that the large $N$ result describes very well the distribution already for $N\gtrsim50$.
} which was shown to be controlled by an optimal configuration (solution of saddle point equations), characterised by the density $\rho^\star(x;\kappa,s)$ of eigenvalues (with $\lambda=N x$ for the Laguerre ensemble), while the optimal occupations are given by the Fermi-Dirac distribution for an effective temperature, Eq.~\eqref{eq:FermiDirac}.
We have shown that varying the two parameters $(\kappa,s)$ drives phase transitions in this optimal configuration.

\paragraph{Phase II.---}

In the absence of any constraint on the eigenvalue density, the (most probable) density is the Mar\v{c}enko-Pastur distribution \eqref{eq:MarcenkoPastur} (Fig.~\ref{fig:MPminmax}).
For a fixed $\kappa$, this density can be associated to a whole spectrum of values of the TLS $s\in[s_0(\kappa),s_1(\kappa)]$, corresponding to different choices for the occupation numbers $\{n_i\}$.
The two extreme situations correspond to choosing the $p$ largest or the $p$ smallest eigenvalues~: cf. Fig.~\ref{fig:MPminmax}. This phase exists in a domain of the phase diagram bounded by two lines $s_1(\kappa)$ and $s_0(\kappa)$ (Fig.~\ref{fig:PhDiag}).
The energy of the Coulomb gas is frozen and the structure of the distribution is entirely due to the \textit{entropy} of the $p$ fictitious non-interacting fermions, which scales as $\sim N$ and is independent of the symmetry index $\beta$, thus $P_{N,\kappa} (s)\sim\exp \left\lbrace - N \Phi_0(\kappa;s) \right\rbrace$, where the large deviation function $\Phi_0(\kappa;s)$ has been determined in Section~\ref{sec:TypFluct}.
As a consequence of this scaling, the relative fluctuations of the TLS are of order $\sim1/\sqrt{N}$ (whereas full linear statistics usually present relative fluctuations $\sim1/N$ as a consequence of the strong correlations in the Coulomb gas).
As the limits $s\to s_0$ and $s\to s_1$ correspond to select the contributions of the largest or the smallest eigenvalues (Fig.~\ref{fig:MPminmax}), they are associated to effective (absolute) fermionic temperature $1/\tilde{\beta}$ positive or negative, respectively (see also Fig.~\ref{fig:MPminmaxFD}).
This new scenario is completly universal (independent of the function $f$ and the specific matrix ensemble).

\paragraph{Phase I.---}

When $s$ reaches the lower boundary $s_0(\kappa)$ of the central domain of the phase diagram (Fig.~\ref{fig:PhDiag}), the effective temperature is fixed to $0^+$ and only the largest eigenvalues contribute to the TLS (Fig.~\ref{fig:MPminmax}).
Smaller value $s<s_0(\kappa)$ can only be realised by a deformation of the optimal density $\rho^\star(x;\kappa,s)$, which is split in two bulks, while occupations are frozen ($1/\tilde{\beta}=0^+$).
The weight of the optimal configuration is now controlled by the \textit{energy} of the Coulomb gas.
In the $s=\sum_{i=1}^p\lambda_i^{-1}\to0$ limit, we have $\lambda_i\sim p/s$, hence the energy is dominated by the confinment energy~: $E_N=N^2\mathcal{E}_\mathrm{gas}\sim p^2/s$.
This corresponds to the behaviour $P_{N,\kappa} (s)\sim\exp[-(\beta/2)N^2\Phi_-(\kappa;s)]$ with $\Phi_-(\kappa;s)\simeq\kappa^2/s$ (see Section~\ref{sec:Coulombgas}).

\paragraph{Phase III.---}

The case where $s>s_1(\kappa)$ was analysed with a mixed scenario.
As for $\kappa=1$ \cite{TexMaj13}, one remarks that it is sufficient to split off a single eigenvalue from the bulk, the smallest one $\lambda_N$, in order to generate large values of the TLS $s=1/\lambda_N+\sum_{i=1}^{N-1}n_i/\lambda_i$~:
i.e. it is more favorable energetically to send one charge towards $0$ as $s$ grows, which generates an energy cost $E_N\sim N$, than move the full bulk, which would generate a cost $E_N\sim N^2$.
When the charge is split off the bulk, there is also an entropic contribution $\sim N$ due to the fluctuating $N-1$ occupation numbers related to the remaining $N-1$ eigenvalues, of the same order as the interaction energy between the isolated eigenvalue and the frozen $N-1$ ones.
This part of the scenario is specific to the function $f(\lambda)=1/\lambda$ that we have considered.

\vspace{0.25cm}

For the case considered in the paper, we have obtained three phases (Fig.~\ref{fig:PhDiag}), however one can imagine that for another function $f$, the phase diagram would involve more than three phases~: the exhaustive study  of Ref.~\cite{VivMajBoh10} for several linear statistics illustrates than the number of different phases depend on the function~$f$ (see also the Table in the conclusion of Ref.~\cite{GraMajTex17}).

\subsection{Crossover across $s_0(\kappa)$ and second order freezing transition}

As the two phases I and II involve two different scalings with $N$, see \eqref{eq:SummarisePN}, it is interesting to discuss further the transition at $s=s_0$, in the vicinity of which the distribution presents the limiting behaviours
\begin{equation}
	P_{N,\kappa}(s) \underset{s \to s_0}{\sim}
	\e^{-N C_\kappa}
	\left\lbrace
		\begin{array}{lc}
		    \e^{-(\beta/2)N^2\Phi_-(\kappa;s)}
			\simeq
			\e^{- N^2 c_- (s - s_0(\kappa))^2}
				& \text{ for } s < s_0(\kappa)
				\\
		    \e^{-N[\Phi_0(\kappa;s)-C_\kappa]}
			\simeq
			\e^{+N c_+ \sqrt{s - s_0(\kappa)}}
				& \text{ for } s > s_0(\kappa)
		\end{array}
	\right.
	\label{eq:PnkTr}
	\:,
\end{equation}
where $c_-=(\beta/2)\omega_\kappa$, cf. Eq.~\eqref{eq:LDFphi0QuadMin}, and $c_+$ is defined in Eq.~\eqref{eq:LimitingBehaviour344}.
From the point of view of the Coulomb gas, $s=s_0(\kappa)$ corresponds to a \textit{freezing transition}~: below $s_0(\kappa)$, the energy scales as $E_N\sim N^2 (s - s_0(\kappa))^2$, whereas the energy is frozen above the transition. This corresponds to a \textit{second order} phase transition (a second order freezing transition of different nature was identified in \cite{TexMaj13}, and also in \cite{NadMajVer10,NadMajVer11} although the transition was not interpreted along these lines in this latter reference).
Note that the energy of the Coulomb gas, Eq.~\eqref{eq:Ediscr}, is $\mathcal{E}_\mathrm{gas}\sim1/N$ everywhere above the line $s_0(\kappa)$. In the thermodynamic limit $N\to\infty$, $\mathcal{E}_\mathrm{gas}$ becomes flat above this line and all derivatives of the energy are trivially continuous across $s_1(\kappa)$.

A finer description of the transition (beyond the thermodynamic limit) requires to identify the non trivial scaling with $N$ for the crossover, given by
\begin{equation}
	N^2 (s - s_0(\kappa))^2 \sim N \sqrt{s - s_0(\kappa)}
	\hspace{0.5cm}
	\Rightarrow
	\hspace{0.5cm}
	s - s_0(\kappa) \sim N^{-2/3}
	\:.
\end{equation}
This leads to introduce a scaling variable $z$ and rewrite the crossover between the two behaviours~\eqref{eq:PnkTr} in terms of a unique function
\begin{equation}
	P_{N,\kappa}(s) \underset{s \to s_0(\kappa)}{\sim} \e^{- N^{2/3} \Psi(z)}
	\hspace{1cm}\mbox{with }
	s = s_0(\kappa) + N^{-2/3} z
	\:.
\end{equation}
The scaling function $\Psi(z)$ describes the detail of the crossover for finite $N$, at a scale $\delta s\sim N^{-2/3}$, and thus presents the limiting behaviours
\begin{equation}
	\Psi(z) \simeq \left\lbrace
		\begin{array}{cc}
			c_- z^2	    &  \text{ for } z \to-\infty \:,
			\\
			-c_+ \sqrt{z}	&  \text{ for } z \to+\infty \:.
		\end{array}
	\right.
\end{equation}
Similar considerations for the distribution of the largest eigenvalue in various matrix ensembles (see the review \cite{MajSch14}) have shown that the corresponding function is universal (Tracy Widom distribution given by Painlev\'e transcendents).
An interesting challenging open question would be to determine whether the function $\Psi(z)$ has also a universal character and find its precise nature.

\subsection{Other open questions}
\label{subsec:OpenQuestions}

The discussion concerning the crossover around $s_0(\kappa)$ cannot be extended to the other phase boundary at $s_1(\kappa)$, as it is not clear how the limiting behaviours obtained above,
$-(1/N)\lnP_{N,\kappa}(s)\simeq C_\kappa-c_+\sqrt{s_1-s}$ for $s<s_1$
and
$-(1/N)\lnP_{N,\kappa}(s)\simeq C_\kappa+(\beta/2)\ln\big[N(s-s_1)\big]$ for $s>s_1$,
can be matched.
Due to the $N$ in the argument of the logarithm, it does not seem that the crossover can be described by a universal function as for $s\sim s_0$.
A precise description of the crossover seems therefore even more challenging in this case.

Another obvervation concerning finite $N$ corrections to the thermodynamics properties is the following~:
our approach is suitable to obtain results in the thermodynamic limit, when both $N$ and $p$ are of the same order (in particular the case $p=1$ would require to adapt the method like it was done in Refs.~ \cite{DeaMaj06,DeaMaj08,VivMajBoh07,MajVer09,MajSchVilViv13,MajSch14}).
Also the limit $\kappa\to1$ is non trivial and can lead to singular behaviours, as it was illustrated in the conclusion of \cite{GraMajTex17}. This is clear from our fermionic picture as fermions and holes play symmetric role, so that the two limits $\kappa\sim1/N$ and $1-\kappa\sim1/N$ should be equally difficult to analyse.

The new universal scenario introduced in the paper was illustrated for a particular ensemble (Laguerre) and a specific \textit{monotonic} function $f$.
We argue now that the same main features would also occur for a \textit{non monotonic} function.
Consider for concreteness the Jacobi case, $\lambda_i\in[0,1]$ and the function $f(\lambda)=\lambda\,(1-\lambda)$ (when $\sum_{i=1}^N\lambda_i(1-\lambda_i)$ is the shot noise power of chaotic quantum dots \cite{Bee97}).
In Phase II, due to the fact that the ``energy levels'' $\varepsilon_i=f(\lambda_i)$ are non monotonic as a function of the eigenvalues of the random matrix, the occupations controlled by the Fermi-Dirac distribution $\mean{n_i}$ would also be represented by a non monotonic function of $\lambda$ (a similar feature occurs when representing the occupation of plane waves by one-dimensional non-interacting fermions~: occupation is a  monotonic function of the energy $\varepsilon_k=k^2$ but a non monotonic function of the wave vector $k$).
The limit $s=(1/N)\sum_in_if(\lambda_i)\to s_0^+$ (lower boundary of Phase II) should correspond to ``cold fermions'' with $\tilde{\beta}\to+\infty$ where the occupation function $\mean{n_i}$ selects both the smallest and the largest eigenvalues.
The large deviations for $s<s_0$ (Phase I) should correspond then to the opening of two gaps.
The upper boundary of Phase II, $s\to s_1^-$, corresponds to ``hot fermions'' with negative temperature (i.e. $\tilde{\beta}\to-\infty$) involving the eigenvalues in the middle of the interval $[0,1]$~; the large deviations for $s>s_1$ should also correspond to the opening of two gaps.
Such a situation for a non monotonic $f$ could certainly be worth studying in details.

We have pointed out the connection between the problem studied in the paper and the ``thinned ensembles'' \cite{BohPat06,ChaCla16,BerDui16,Lam16}, Eq.~\eqref{eq:RelationWithThinned}.
It is clear that the correspondence between the two situations (fixed \textit{versus} fluctuating $p$) requires $\kappa=p/N$ being the probability of the thinned ensemble.
Because the large deviation function controlling the distribution of the truncated linear statistics  has the interpretation of a thermodynamic potential and has been computed in the thermodynamic limit, one could naively expect that the two situations are equivalent.
However, the equivalence of the statistical physics ensembles is far from being obvious in these log correlated gases and may be worth to explore more into detail (note that, in our paper, the equivalence between grand canonical, canonical and microcanonical ensembles has been extensively used only for the \textit{non interacting} fictitious \textit{fermions}, i.e. only in the central region of the phase diagram (Fig.~\ref{fig:PhDiag}) when eigenvalues are \textit{frozen}).

Coming back to the initial motivation within chaotic scattering, the paper has mostly focused on the question of the partial sums of proper time delays.
We have also emphasized the role of the Wigner-Smith matrix' diagonal elements $\mathcal{Q}_{ii}$, which are important for applications in quantum transport~:
the statistical properties of the partial sum of these matrix elements were analysed in the appendix for $\beta=2$, based on the relation between $\mathcal{Q}_{ii}$ and partial time delays $\tilde{\tau}_i$ \cite{SavFyoSom01}.
Because the joint distribution of the $\mathcal{Q}_{ii}$'s is still unknown, a general analysis of their partial sums in the general case, beyond the two first moments, remains a challenging question.

\section*{Acknowledgements}

We are indebted to Dmitry Savin for many useful discussions on chaotic scattering.

redpajama_set_name: RedPajamaArXiv