Say I have a CDF of the form  $$F(x) = \sum_{i=1}^n \frac{ k_i }{ 1 + (x/\alpha_i)^{ - \beta_i } }$$  $$\sum_{i=1}^n k_i = 1$$  How do I find the quantile function, i.e. how do I invert F for n>1? I tried the simpler n=2 case by hand, but I'm getting nowhere. I also tried , but no luck.  If there is no closed-form solution, can you point to a (googleable) way to get a numerical approximation (say in python)?
42935
My PDF:     M was estimated and found to be 5.   I need to work out the quartiles for the PDF above. In addition, I need to use different methods of estimation to estimate the parameters. So far I've successfully used the method of moments. I'm finding it difficult to form the likelihood function.  This is the approach I took to work out the quartiles, which I believe is not correct; quartile 1 below:    And this is what I have so far for the likelihood function:    Any help would be truly appreciated! Thank you.
10033
I'd like to determine the function corresponding to the following power series: $$x + \sum_{n=1}^\infty (-1)^n\frac{1\cdot3\cdot5\cdots(2n-1)}{2\cdot4\cdot6\cdots2n} \frac{x^{2n+1}}{2n+1}, $$ where $|x|&lt;1$.
50265
$F$ is a distribution function .Take any $a \in \mathbb{R}$.  Then evaluate : $\displaystyle\int_{\mathbb{R}} (F(x+a)-F(x)) dx$   As it is a general distribution function , I cannot employ densities to solve this problem . Any insights or a complete solution will be very appreciated .
117636
I know that the proof of the  has been given multiple times on this site. However, the proofs I found use the hypothesis that the CDF $F_X(x)$ is strictly increasing (together, of course, with the hypothesis that $X$ is a continuous random variable). I know that actually the only required hypothesis is that $X$ is a continuous random variable, and strict monotonicity is not required. Can you show me how?  Since I'm already here, I also take the occasion to ask for a simple application of the probability integral transform :) can you show me that, if $X$ has CDF $F_X(x)$ and $Y$ is the truncation of $X$ to $[a,b]$, then $Y$ is distributed as  $F_X^{-1}(U)$ where $U\sim[F_X(a),F_X(b)]$?
24620
Are there well known formulas for the order statistics of certain random distributions? Particularly the first and last order statistics of a normal  random variable, but a more general answer would also be appreciated.  Edit: To clarify, I am looking for approximating formulas that can be more-or-less explicitly evaluated, not the exact integral expression.  For example, I have seen the following two approximations for the first order statistic (ie the minimum) of a normal rv:  $e_{1:n} \geq \mu - \frac{n-1}{\sqrt{2n-1}}\sigma$  and  $e_{1:n} \approx \mu + \Phi^{-1} \left( \frac{1}{n+1} \right)\sigma$  The first of these, for $n=200$, gives approximately $e_{1:200} \geq \mu - 10\sigma$ which seems like a wildly loose bound.  The second gives $e_{1:200} \approx \mu - 2.58\sigma$ whereas a quick Monte Carlo  gives $e_{1:200} \approx \mu - 2.75\sigma$, so it's not a bad approximation but not great either, and more importantly I don't have any intuition about where it comes from.  Any help?
30753
I was thinking whether I can replace this sum by an integral , because I can't think of a distribution whose mgf looks like this. Please Help!
100312
Let $X_1,X_2,...,X_n$ be i.i.d with df $F(y)=y^{\theta}, 0&lt;y&lt;1, \theta&gt;0$. Show that $\frac{X_{(i)}}{X_{(n)}}$, for $i=1,2,...,n-1$ and $X_{(n)}$ are independent.  I found the population pdf to be $$f(x)=\theta x^{\theta -1} I_{0&lt;x&lt;1}$$ Now, $$f(x_1,x_2,...x_n)=\theta^n\prod_{i=1}^{n}{x_{i}}^{\theta - 1}$$ Now, the joint distribution of the order statistics: $$f_{1,2,..,n}(x_1,...x_n)=n! \theta^n\prod_{i=1}^{n}{x_{i}}^{\theta - 1} I_{0&lt;x_1&lt;x_2,...&lt;x_n&lt;1}$$ Now , we take the transformation $Y_i=\frac{X_i}{X_n} $ for $i=1,2,..,n-1$ and $Y_n=X_n$ Have I done correctly so far? Also, I found out the Jacobian of transformation $={y_n}^{n-1}$. I am also finding it difficult to get the ranges of $Y_i$'s. Help!
47993
The question comes from the paper ``Regression Quantiles'' by Roger Koenker and Gilbert Bassett(Econometrica, 1978).   $0&lt; \theta &lt;1$. Define $\psi(b;\theta,y,X)=\sum^{T}_{t=1}[\theta-1/2+1/2 \; \text{sgn}(y_{t}-x_{t}b)][y_{t}-x_{t}b]$, where sgn(u) takes values $1,0,-1$ as $u \gtreqless 0$.  Here, $y_{t}$ is a scalar and $x_{t}$ is a $K \times 1$ vector.  Then \textbf{my question} is: what is the directional derivative of $\psi(b)$ in the direction $w$?  The paper states that the answer is  \begin{equation} \psi^{\prime}(b;w)=\sum^{T}_{t=1}[1/2-1/2 \; \text{sgn}^{\ast}(y_{t}-x_{t}b;-x_{t}w)-\theta]x_{t}w, \end{equation}  where   $\text{sgn}^{\ast}(u;z)=  \begin{cases} \text{sgn} \; u \; \text{if} \; u \neq 0,\\ \text{sgn} \; z \; \text{if} \; u = 0 \end{cases}$  But I do not know how to derive this result.
1885
Suppose that $X_1,X_2,\ldots,X_n$ is a random sample from a distribution with probability function:  $$p_X(x)=\begin{cases} 1/2 &amp;x=-1,1 \\ 0 &amp; \text{otherwise} \end{cases}$$  Now if we define the average   $\bar{X}= \frac{1}{n} \sum X_i$, I need to show that that for an odd $n$ the probability function for $\bar{X}$ is:  $$p_{\bar{X}} (x)= \frac{\binom{n}{\frac{n}{2} (x+1)}}{2^n}$$ for $x=\pm 1/n,\pm 3/n,\ldots,\pm 1$, $0$ otherwise.    Since $P[\sum X_i=k] =P [\bar{X}=k/n ]$, I thought it would be easier to first derive the probability function for the sum. Since they are still $2^n$ n-tuples and each one is equilikely, I need to count the ones whose sum is $k$ for:  $k=\pm 1,\pm 3,\ldots \pm n-2,\pm n$ (since even numbers are not a feasible combination)  The problem here though is that I do not immediately recognize how I could count all these tuples. Could you please help me with this? If it is easier to proceed another way, I am of course all ears.
104524
As part of homework I'm trying to find the limit of $\sqrt[n]{{kn \choose n}}$ (with $k\in\mathbb{N}$ a given parameter).  I've seen , on which the only answer suggests using Stirling's approximation, which I've never learned and I can't seem to understand.  Trying to solve this myself, I first tried finding the ratio directly, which gave me $$\frac{{kn+k \choose n+1}}{{kn \choose n}}=\frac{\frac{\left(kn+k\right)!}{\left(n+1\right)!\left(kn+k-n-1\right)!}}{\frac{kn!}{n!\left(kn-n\right)!}}=\frac{\left(kn+k\right)!n!\left(kn-n\right)!}{\left(n+1\right)!\left(kn+k-n-1\right)!kn!}  =\frac{\left(kn+k-n\right)\left(kn+k-n+1\right)\cdots\left(kn+k\right)}{\left(n+1\right)\left(kn-n+1\right)\cdots\left(kn-n\right)} $$ That I'm not really sure how to use.  So instead I tried finding something that I might be able to say is bigger and smaller to use squeeze on, which gave me: $${kn \choose n}=\frac{kn!}{n!\left(kn-n\right)!}=\frac{\left(kn-n+1\right)\cdots\left(kn\right)}{n!}\leq k^{n}\frac{n^{n}}{n!}$$ And then showing that  $$ \frac{\frac{\left(n+1\right)^{n+1}}{\left(n+1\right)!}}{\frac{n^{n}}{n!}}=\frac{\left(n+1\right)^{n+1}n!}{n^{n}\left(n+1\right)!}=\frac{\left(n+1\right)^{n}\left(n+1\right)}{n^{n}\left(n+1\right)}=\left(1+\frac{1}{n}\right)^{n}\to\epsilon$$ gives the larger limit of   $$\sqrt[n]{{kn \choose n}}\leq\sqrt[n]{k^{n}\frac{n^{n}}{n!}}=\sqrt[n]{k^{n}}\sqrt[n]{\frac{n^{n}}{n!}}=k\cdot\sqrt[n]{\frac{n^{n}}{n!}}\to k\cdot e  $$  But it's obviously not the limit itself since for i.e. $k=1$ the limit is 1 and $k=2$ the limit is 4.  So I'm pretty much stuck, any hints on how I might be able to solve it?
43689
Let $X_1, \ldots, X_n$ be uniformly distributed on $[0,1]$ and $X_{(1)}, ..., X_{(n)}$ the corresponding order statistic. I want to calculate $Cov(X_{(j)}, X_{(k)})$ for $j, k \in \{1, \ldots, n\}$.  The problem is of course to calculate $\mathbb{E}[X_{(j)}X_{(k)}]$.  The joint density of $X_{(j)}$ and $X_{(k)}$ is given by $$f_{X_{(j)}, X_{(k)}}=\binom{n}{k}\binom{k}{j-1}x^{j-1}(y-x)^{k-1-j}(1-y)^{n-k}$$ where $0\leq x\leq y\leq 1$. (I used the general formula .)  Sadly, I see no other way to calculate $\mathbb{E}[X_{(j)}X_{(k)}]$ than by $$\mathbb{E}[X_{(j)}X_{(k)}]=\binom{n}{k}\binom{k}{j-1}\int_0^1\int_0^yxyx^{j-1}(y-x)^{k-1-j}(1-y)^{n-k}\,dx\,dy.$$  But this integral is too much for me. I tried integration by parts, but got lost along the way.  Is there a trick to do it? Did I even get the limits of integration right?  Apart from that, I wonder if there's a smart approach to solve the whole problem more elegantly.
766
X has a Uniform distribution $U(0,1)$. I have to find the distribution of the variable $U =|X-1/3|$.  This is what i can get so far :  $F(U) \;{= P\{U &lt; u\} \\ = P\{| X-1/3 | &lt; u\} \\ \ddots}$  I know that i shall get something like $P\{-(U-1/3) &lt; X &lt; U -1/3\}$. Could anyone explain how to get the PDF and the CDF for this problem and explain how can i easily change this absolute values for other problems ( other examples $Z=1-|X|,~~G=|X|-1$ etc..).
47506
Suppose I'm given the mean and one quantile (e.g. the 20% quantile) of a random variable $x$, and I want to find the parameters $\alpha$ and $\beta$ of a Beta distribution that has the same mean and quantile.  Is there an efficient way to do it?    Using just the mean, I know that since $\bar{x} = \frac{\alpha}{\alpha+\beta}$, we have $\beta = \frac{\alpha}{\bar{x}} - \alpha$.  So we only really have one parameter to estimate.  But I'm unsure how to use the quantile information to take the next step.  Maybe there's something I can do with the Incomplete Beta when I know the ratio $\frac{\beta}{\alpha} = \frac{1-\bar{x}}{\bar{x}}$?  I have access to R myself, so I could use a numerical optimizer for this, but ideally I need a method that can be carried out in Excel in someone else's environment.  Excel does have BETA.DIST() and BETA.INV() functions available.  A look-up table would be fine, but a closed-form formula would be better if it's possible.
3624
$$f(x)=\lim_{n\to\infty}\biggl(n\int_0^{\pi/4}(\tan x)^n\,dx\biggr)$$ I try to this way, $\tan x\ge x$, when $x\in(0,\frac\pi4)$, but this turns out to be $\tan x\ge0$, which is obvious even without calculation. I think it can be solved by using the squeeze rule but I can't find a proper scaler to meet $A=g(x)\le f(x)\le h(x)=A$ when $n\to\infty$   $\color{red}{Edit}$: According to@Khallil's advice, I can solve that $f(n)+f(n+2)=\frac1{n+1}$, and it's trivial that $\frac1{n+1}=f(n)+f(n+2)\le 2f(n)\le f(n-2)+f(n)=\frac1{n-1}$. So $f(x)=\frac12$.  This is easy and quick. Btw, is there any other idea?  $\color{red}{Edit[2]}$: I find that @Byron Schmuland 's method is especially useful in a specific kind of problem. $$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx$$,for example, Let $X_,...,X_n$ be i.i.d. random variables with density$f(x)=1$ on $(0,1)$, CDF(cumulative density function) of $X$ is $F(x)=x$. Now let $M=\max(X_1,\dots,X_n)$, its density function is: $f_M(x)=nx^{n-1}$ for $x\in(0,1)$ Also, it's also not hard to see that $M\to1$ in distribution as $n\to\infty$. So,$$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx=\lim_{n\to\infty}\frac1n\int_0^1{f_M(x)\frac{x}{x+1}dx}=\lim_{n\to\infty}\frac1nE(\frac{M}{M+1})=0$$ Although this simple example can be solved by other ways more easily, but this gives us another perspective.
120164
Find the ordered pair $(\alpha,\beta)$ with non-infinite $\beta \ne 0$ such that $$\lim_{n\to\infty} \frac{\sqrt[n^2]{1!2!\cdots n!}}{n^\alpha} = \beta$$  My approach:   $$\ln (1!2!\cdots n!) = (n)\ln 1 + (n-1)\ln 2 + \cdots + (2)\ln (n-1) + \ln(n) \\ \begin{align} = n\ln\left(\frac{1}{n}\right) + (n-1)\ln\left(\frac{2}{n}\right) + \cdots + \ln\left(\frac{n}{n}\right) + \frac{(n)(n+1)}{2} \ln (n)\end{align}$$  Then $$\ln(\sqrt[n^2]{1!2!\cdots n!}) = \frac{1}{n^2} \ln(1!2!\cdots n!) = \frac{n+1}{n} \cdot \ln n + \frac{1}{n} \left[\sum_{m=1}^n \left(\frac{n+1-m}{n} \cdot \ln \frac{m}{n}\right)\right]$$  And that's about as far as I got. Any ideas about proceeding with this method or perhaps even with a different method?  Thanks  A
57619
I want to estimate the quantile of some data. The data are so huge that they can not be accommodated in the memory. And data are not static, new data keep coming. Does anyone know any algorithm to monitor the quantiles of the data observed so far with very limited memory and computation? I find  useful, but it does not work very well for my data, which are extremely heavy-tailed distributed.
116512
Suppose we have $X_1, \cdots, X_n \overset{\textrm{i.i.d.}}{\sim} \mathcal{N}(0, 1)$ with $n &gt; 50$, and let $X_{(1)}, \cdots, X_{(n)}$ be the associated order statistics. Are there any references pointing to formulas that specify (or estimate) the variance of the $k^{\textrm{th}}$ order statistic, i.e. $\textrm{Var}(X_{(k)})$, for $1 \leq k \leq n$? I am looking for formulas can be explicitly evaluated without resorting back to numerical integration.  I have seen this question: , which attracted a number of answers on approximate formula for the mean of the $k^{\textrm{th}}$ order statistic, e.g. Blom (1958) (and modifications based on work by Harter (1961) and Elfving (1947)). Searching on Google also yields a number of work on the variance / standard deviation for the $k^\textrm{th}$ order statistics for small $n$, all of them opting for a computation/tabulation route. They are: Godwin(1949), Teichroew (1956), and Parrish (1992). I have also attempted to derive something myself following the method sketched by @probabilityislogic in , along the lines of: $$\textrm{Var}(X_{(k)}) = \int_{-\infty}^{\infty} \left(x-\mathbb{E}(X)\right)^2 \frac{n!}{(k-1)!(n-k)!} f_X(x)[1-F_X(x)]^{n-k}[F_X(x)]^{k-1}\;\textrm{d}x,$$ with lower case $f$ denoting the PDF of a r.v. $X$, and upper case $F$ denoting the CDF. Noting $x = F^{-1}(F_X(x))$ and using the substitution $u = F_X(x)$ (with corresponding r.v. in upper case $U$), we have: $$\textrm{Var}(X_{(k)}) = \int_{0}^{1} \left(F_X^{-1}(u) - \mathbb{E}\left(F_X^{-1}(U)\right)\right)^2\,\mathcal{B}(u | k, n-k+1) \; \textrm{d}u,$$ where $\mathcal{B}$ denotes the PDF of a beta distribution (not the beta function). This can be rewritten as the variance based on the beta distribution: $$\textrm{Var}(X_{(k)}) = \textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right).$$ Approximating the RHS using (the variance bit of the) delta method, we get: $$\textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right) \approx \textrm{Var}_{\mathcal{B}(u | k, n-k+1)}(U) \cdot \left[(F_X^{-1})'\left(\mathbb{E}_{\mathcal{B}(u | k, n-k+1)}(U)\right)\right]^2,$$ where the prime denotes the derivative. The first term of the product is standard result. For the second part, given $(F^{-1})'(\cdot)=\frac{1}{f(F^{-1})(\cdot)}$ (see e.g. ), we then have: $$\textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right) \approx \frac{k(n-k+1)}{(n+1)^2(n+2)} \frac{1}{\left(f\left(F^{-1}\left(\frac{k}{n+1}\right)\right)\right)^2}.$$ Substituting in the standard normal distribution ($\phi$ for PDF, $\Phi$ for CDF) and scaling it to the desired variance $\sigma^2$ we arrive at: $$\textrm{Var}(X_{(k)}) \approx \frac{k(n-k+1)}{(n+1)^2(n+2)} \frac{1}{\left(\phi\left(\Phi^{-1}\left(\frac{k}{n+1}\right)\right)\right)^2},$$ which we can throw in a $\sigma^2$ term in front if it is not a standard normal. But surely someone must have derived that somewhere (again I am looking for some references), and there is a high chance that I have gone off track somewhere above.