I'm trying to test some data for the best distribution fit, and am looking to try the t-dist (all theoretically, no R computations) I think the best way to do this is to assume the distribution is true, use MLE or MoM to estimate parameters and then conduct a goodness-of-fit test. Firstly, is this an appropriate way to do it? Secondly, what is the theoretical derivation for the parameters of the t-dist (using MLE or Mom) And thirdly, how do you estimate the degrees of freedom for a t-test?  Thanks
122046
What are the maximum-likelihood estimators for the parameters of Student's t-distribution? Do they exist in closed form? A quick Google search didn't give me any results.  Today I am interested in the univariate case, but probably I will have to extend the model to multiple dimensions.  EDIT: I am actually mostly interested in the location and scale parameters. For now I can assume that the degrees of freedom parameter is fixed, and possibly use some numeric scheme to find the optimal value later.
48038
I got two distribution which are not pairs. It's difficult to say that they are also from a normal distribution because they have different length.  The distributions of the vectors are, for gas: 65  65  65  65  74  74  74  74  74  77  78  81  81  83  83  83  85  85  85  85  85  87  87 89  89  90  91  91  91  91  91  91  94  94  94  95  95  95  95  98 101 101 101 102 102 102 102 102 103 103 103 103 103 104 104 104 104 104 104 106 106 106 106 107 108 108 110 110 113 113 115 115 115 118 118 118 118 119 119 121 122 122 122 125 125 125 128 128 128 128 128 129 129 134 134 134 134 134 134 137 137 137 142 145 145 148 148 148 148 150 150 150 150 150 150 150 153 153 154 154 154 158 158 161 161 161 161 161 161 161 161 164 164 168 168 168 168 168 186 188 188 192 192 194 194 197 197 231 256  while for the diesel vector distribution is:  65  91  91  93  93  93  93  94  94  95 122 128 161 161 161   I made the t.test and the wilcox.test and I got these results:  Welch Two Sample t-test  data:  diesel_type and gas_type t = -1.7104, df = 18.149, p-value = 0.1042 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -31.873874   3.256425 sample estimates: mean of x mean of y  109.0000  123.3087    and Wilcoxon test is:  data:  diesel_type and gas_type W = 843, p-value = 0.1179 alternative hypothesis: true location shift is not equal to 0   I could accept the null hypothesis in the t.test, saying that the means are equals because the p-value is over the 5%. Should I accept the null hypothesis in the Wilcoxon test too? Are the medians equals? What could I say about these results?
70944
I often find myself asking questions like, "I know this variable $x$  lies in $(0,1)$ and most of the mass lies in $(0,.20)$ and then declines continuously towards 1.  What distribution can I use to model it?"  In practice, I wind up using the same few distributions over and over again simply because I know them.  Instead, I'd like to look them up in a more systematic way.  How do I go about accessing the wealth of work that probabilitists have done developing all of these distributions?  Ideally I'd like a reference organized by properties (region of support, etc.), so I can find distributions by their characteristics and then learn more about each distribution based on the tractability of the pdf/cdf and how closely the theoretical derivation fits the problem I'm working on.  Does such a reference exist, and if not, how do you go about choosing distributions?
22014
I was doing my homework and the following problem came up! We have the CDF of an exponential distribution that is shifted $L$ units where $L&gt;0$ and $x&gt;=L$. The CDF is:  $$1-e^{-\lambda(x-L)}$$  The question says that we should assume that the following data are lifetimes of electric motors, in hours, which are:  $$\begin{align*} 153.52,103.23,31.75,28.91,37.91,7.11,99.21,31.77,11.01,217.40 \end{align*}$$  Please note that the $mean$ of these numbers is: $72.182$  Now the question has two parts which I will go through one by one:  Part1: Evaluate the log likelihood for the data when $\lambda=0.02$ and $L=3.555$. Now the way I approached the problem was to take the derivative of the CDF with respect to $\lambda$ to get the PDF which is:  $$(x-L)e^{-\lambda(x-L)}$$  Then since we have $n$ observations where $n=10$, we have the following joint pdf, due to independence:  $$(x_i-L)^ne^{-\lambda(x_i-L)n}$$ which can be rewritten as the following log likelihood:  $$n\ln(x_i-L)-\lambda\sum_{i=1}^n(x_i-L)$$ Is this the correct approach? Because it would take quite a while and be pretty cumbersome to evaluate $n\ln(x_i-L)$ for every observation?  Part2: The question also asks for the ML Estimate of $L$. So assuming the log likelihood is correct, we can take the derivative with respect to $L$ and get:  $\frac{n}{x_i-L}+\lambda=0$ and solve for $L$? Is this correct? Because I am not quite sure on how I should proceed?  Thanks so much for your help! I greatly appreciate it :)
46265
Consider a random sample $X_1, X_2, \dots, X_n$ from the shifted exponential PDF $$f(x; \lambda, \theta) = \begin{cases}\lambda e^{-\lambda(x-\theta)} ;&amp; x \geq \theta\\                     \theta ; &amp;\text{Otherwise}\end{cases}$$ Taking $\theta = 0$ gives the pdf of the exponential distribution considered previously (with positive density to the right of zero). a. Obtain the maximum likelihood estimators of $\theta$ and $\lambda$. I followed the basic rules for the MLE and came up with: $$\lambda = \frac{n}{\sum_{i=1}^n(x_i - \theta)}$$ Should I take $\theta$ out and write it as $-n\theta$ and find $\theta$ in terms of $\lambda$?
23843
Suppose that we are given an exponential distribution model with a pdf $f(x,\theta) = \theta^{-1}\exp(-x/\theta)$ with an iid sample $X_1, ..., X_n$, and we would like to test hypothesis $H_0 : \theta = 1$ and $H_1 : \theta &gt; 1$. We shall investigate the limiting distribution of the likelihood test statistic $2n(l_n (\hat\theta) - l_n (1))$ where $l_n(\theta)$ is the log-likelihood function $\sum \log f(x,\theta$) and $\hat \theta$ is the MLE of $\theta$ in the parameter space. We shall investigate the asymptotic behavior of the test statistic.  Note that the parameter space is not the whole real line, so it does not create an open neighborhood around $H_0: \theta = 1$). Here is what I have discovered so far: we know that the MLE of exponential distribution is $\overline X_n$, the sample mean if we are allowed to take the whole parameter space. Using a similar argument, if the sample mean is greater than one, the same argument works. However, if it is smaller than or equal to one, the MLE is 1 (we can show it using a monotonicity argument). Hence, the test statistic becomes  $\begin{cases} 2n(\ln \overline X_n - (\overline X_n - 1)) &amp;&amp; \text{if $\overline X_n &gt; 1$} \\ 0 &amp;&amp; \text{if $\overline X_n \leq 1$} \end{cases}$  we can use then a taylor expansion for the first case to show that it is indeed approximately equal to $n(\overline X_n - 1)^2$ that has a $\chi^2$-distribution asymptotically. However, how can we incorporate the case where $\overline X_n \leq 1$? If $H_1$ were $\theta \neq 1$ it would have been safe and sound. I guess the test becomes $\sum \overline X_n &gt; k$ for some $k$, due to the zero part for the second case?
47003
I'm trying to find the minimal sufficient statistics for a Cauchy distributed random sample $X_1,...,X_n$, here \begin{equation} f(x|\theta) = \frac{1}{\pi[1+(x-\theta)^2]} \end{equation} I begin by guessing that the order statistics are the minimal sufficient statistics (first of all, they are sufficient). Then I try to prove that \begin{equation} \frac{f(X|\theta)}{f(Y|\theta)} = \prod_{i=1}^n\frac{1+(y_i-\theta)^2}{1+(x_i-\theta)^2}=C \end{equation} Where $C$ is a constant of $\theta$, I want to prove that the above equation holds iff $T(X)=T(Y)$, where $T(X)$ is the order statistics of $X$.  I am really stuck and don't know how to show why that if it holds then $T(X)=T(Y)$, can anyone help me on this proof? Thanks in advance!  p.s., a similar thread  discusses the problem but offers no proof for the minimal sufficiency.
96327
Is there a way to closely approximate the CDF of a student-t distribution at a point $x$ without involving the hypergeometric function? For example, by using a series expansion, or expressing the CDF in terms of simpler functions?  The t-distribution can   $$t = \frac{X\sqrt{n}}{Y}$$  where $X$ is normally distributed with mean 0 and variance $\sigma^2$; $\frac{Y^2}{\sigma^2}$ has a chi-squared distribution. Maybe this expression can help simplify the t CDF?  I am trying to write an algorithm to compute the student-t CDF for any real number, so using the hypergeometric function will be extremely difficult. I am also trying to avoid integrating the PDF to get the CDF.
92534
I wonder if there is any statistical test to "test" the significance of a bimodal distribution. I mean, How much my data meets the bimodal distribution or not? If so, is there any test in the R program?
42890
We have ground-truth data $\mathbf{x}^* = (0,0)^T \in \mathbb{R}^{2}$. Furthermore, we have $N$ measurements $\mathbf{x}_i \in \mathbb{R}^{2}, i\in \{1,\ldots,N\}$. We calculate the $N$ error vectors $\mathbf{e}_i = \mathbf{x}_i - \mathbf{x}^*$. We assume that the two components of $\mathbf{e}_i = (e_{x,i}, e_{y,i})^T $ are independent of each other and normally distributed with equal mean $\mathbf{\mu} = (0,0)^T$ and variance $\sigma^2$. The absolute errors $e_i = \sqrt {e_{x,i}^2 + {e}_{y,i}^2} $ follow a Rayleigh distribution, is that correct?  The probability density function (PDF) of the Rayleigh function is zero at a value of zero. Why is this the case (intuitively)? I would assume that our errors should most likely be 0 (i.e. PDF should be highest at 0)...
49484
This is a recurring question (see ,  and ), but I have a different spin.  Suppose I have a bunch of samples from a generic MCMC sampler. For each sample $\theta$, I know the value of the log likelihood $\log f(\textbf{x} | \theta)$ and of the log prior $\log f(\theta)$. If it helps, I also know the value of the log likelihood per data point, $\log f(x_i | \theta)$ (this information helps with certain methods, such as WAIC and PSIS-LOO).  I want to obtain a (crude) estimate of the marginal likelihood, just with the samples that I have, and possibly a few other function evaluations (but without rerunning an ad hoc MCMC).  First of all, let's clear the table. We all know that the harmonic estimator is the . Let's move on. If you are doing Gibbs sampling with priors and posteriors in closed form, you can use ; but I am not sure how to generalize outside of those cases. There are also methods that require you to modify the sampling procedure (such as via ), but I am not interested in that here.  The approach I am thinking of consists of approximating the underlying distribution with a parametric (or nonparametric) shape $g(\theta)$, and then figuring out the normalization constant $Z$ as a 1-D optimization problem (i.e., the $Z$ that minimizes some error between $Z g(\theta)$ and $f(\textbf{x}|\theta) f(\theta)$, evaluated on the samples). In the simplest case, suppose that the posterior is roughly multivariate normal, I can fit $g(\theta)$ as a multivariate normal and get something similar to a Laplace approximation (I might want to use a few additional function evaluations to refine the position of the mode). However, I could use as $g(\theta)$ a more flexible family such as a variational mixture of multivariate $t$ distributions.  I appreciate that this method works only if $Z g(\theta)$ is a reasonable approximation to $f(\textbf{x}|\theta) f(\theta)$, but any reason or cautionary tale of why it would be very unwise to do it? Any reading that you would recommend?  The fully nonparametric approach uses some nonparametric family, such as a Gaussian process (GP), to approximate $\log f(\textbf{x}|\theta) + \log f(\theta)$ (or some other nonlinear transformation thereof, such as the square root), and  to implicitly integrate over the underlying target (see  and ). This seems to be an interesting alternative approach, but analogous in spirit (also, note that GPs would be unwieldy in my case).
74497
A random sample $X_1,\ldots,X_n$ is taken from a distribution with probability density function which is $B(\theta,2\theta)$. Show that $\prod X_i(1-X_i)^2$ is a sufficient statistic for $\theta$.  Below is the beta distribution with the parameters referred to:  $$f_X(x;\theta)=\frac{\Gamma(3\theta)}{\Gamma(\theta)(\Gamma(2\theta)}x^{\theta-1}(1-x)^{2\theta-1}$$  To be honest, this question is beyond me. I don't know how to start.   I have been reading up about sufficient statistics, and using factorisation theorem, but I don't know if this is the right approach and I don't really know where to begin with this.  Do I need to work out a joint pdf? Do I need to know the likelihood function? Is factorisation theorem even the right thing to use?  Any help (even if it is just directing me to a source for "sufficient statistics for dummies") is much appreciated!
101184
Let $X$ be any distribution with defined mean, $\mu$, and standard deviation, $\sigma$.  The central limit theorem says that  $$ \sqrt{n}\frac{\bar{X} - \mu}{\sigma}  $$ converges in distribution to a standard normal distribution.  If we replace $\sigma$ by the sample standard deviation $S$, is there a theorem stating that  $$ \sqrt{n}\frac{\bar{X} - \mu}{S}  $$ converges in distribution to a t-distribution?  Since for large $n$ a t-distribution approaches a normal, the theorem, if it exists, may state that the limit is a standard normal distribution.  Hence, it would seem to me that t-distributions are not very useful - that they are useful only when $X$ is roughly a normal.  Is this the case?    If it is possible, would you indicate references that containing a proof of this CLT when $\sigma$ is replace by $S$?  Such a reference could preferably use measure theory concepts.  But anything would be great to me at this point.
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.
91037
So suppose I'm trying to decide whether to reject the null hypothesis that the mean of some random variable $X$ is zero based on the sample mean $\hat{\mu}$ computed from $n$ IID draws of this random variable.  Then normally I would do a $t$ test $$t=\frac{\hat{\mu}}{\hat{\sigma}\;/ \sqrt{n}}$$  and check to see what the probability is that one would draw a more extreme value than $t$ from the $t$ distribution.  But why even bother scaling by $\sqrt{n}$?  Why not just use ?  After all isn't that the true distribution for the sample mean $\hat{\mu}=\frac 1n\sum_{i=1}^nX_i$?  The only reason I can see to bother is so that for large $n$ Student's t distribution approximates the standard normal distribution, which might simplify computation, is this the only reason it's done?
110112
What methods can I use to infer a distribution if I know only three percentiles?  For example, I know that in a certain data set, the fifth percentile is 8,135, the 50th percentile is 11,259, and the 95th percentile is 23,611.  I want to be able to go from any other number to its percentile.  It's not  my data, and those are all the statistics I have.  It's clear that the distribution isn't normal.  The only other information I have is that this data represents government per-capita funding for different school districts.  I know enough about statistics to know that this problem has no definite solution, but not enough to know how to go about finding good guesses.  Would a lognormal distribution be appropriate?  What tools can I use to perform the regression (or do I need to do it myself)?
62578
Let $Z_1, Z_2,... Z_n \sim Ber(\theta)$  Let $X$ be the number of trials before the 1st success. So $X \sim NB(1,\theta)$  First, I was asked to find an MLE of $\theta$ based on $X$. I did this by going through the MLE procedure for a single rv $X$ which yielded my estimator $\frac{1}{x}$.  Next, I was asked to find the MLE for $f(\theta)=\frac{\theta}{1-\theta}$. For this, I used the invariance property of MLEs so since $\frac{1}{x}$ estimates $\theta$, the estimator for $f(\theta)=\frac{1}{x-1}$. My problem with this estimator is that it is undefined when $x=1$.  Where did I go wrong? Thanks.