1
$\begingroup$

I'm looking for a reasonable way to measure how unlikely a data point is assuming it's generated by a random variable that follows log-normal. Do we have something like Z-value for normal distribution that can be applied to lognormal distribution?

To get the parameters of the distribution, I'm following a method similar to answers provided to this question:

shape, location, scale = scipy.stats.lognorm.fit(listofdata)
mu, sigma = np.log(scale), shape
$\endgroup$
  • 3
    $\begingroup$ Once you take logarithms, then you can work with z values on that scale. $\endgroup$ – Nick Cox Jul 30 at 21:20
  • $\begingroup$ The series I'm working with has the features of a lognormal distribution by its nature. I'm not taking a log of a normal data series. Does that change anything? Datapoints are heavily focused around 1 with long-tail toward infinity, with a maximum lower than 3. $\endgroup$ – Mehdi Zare Jul 30 at 21:23
  • $\begingroup$ @NickCox What would you say about taking the $0.025$ and $0.975$ quantiles like we would get from $z=\pm2$? (Or perhaps calculating the empirical quantile and walking it back to the z-value?) $\endgroup$ – Dave Jul 30 at 21:23
  • $\begingroup$ A long tail toward infinity and a maximum lower than 3: I have difficulty envisaging that. No matter: in my view the best check of lognormality is a normal quantile plot of the logarithms. @Dave's suggestions indicate the kind of numerical calculations you can add to that. $\endgroup$ – Nick Cox Jul 30 at 21:35
3
$\begingroup$

To elaborate on my comment, if you want to give something that is like a z-value equivalent, you could calculate the quantile of the point that you have and then give the z-value for that quantile in a normal distribution.

If you get that your point is at quantile $0.975$, you know that to be be $z_{equivalent} = 1.96$, since quantile $0.975$ of a normal distribution is equal to a z-value of $1.96$.

I'm not sure how much I like this, but if you're trying to communicate with an audience that understands z-scores but not quantiles, this might communicate what you're trying to say.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ I don't have much experience with lognormal, but have been using z-value as a measure of how unlikely is a data point compared to the sample it's originated from. Do you imply that I can use the same concept on a lognormal distribution? I was doubtful of using z-value because the lognarm is not symmetrical around mean. $\endgroup$ – Mehdi Zare Jul 30 at 22:11
  • 1
    $\begingroup$ For a normal distribution, z-score is a proxy for the quantile, so if you say that you have a z-score of $1.96$, what you mean is that you're in the top $2.5\%$ of the distribution. What I propose is that you calculate the quantile directly. For lognormal, you won't have something familiar like $z=1.96 \implies$ quantile $0.975$, but if you get that you're at the $0.975$ quantile of your distribution, you could report that as being a z-score equivalent of $z=1.96$. This might be useful if your audience does not understand quantiles but is comfortable with z-scores. $\endgroup$ – Dave Jul 30 at 22:15
  • $\begingroup$ So if you get an observation that has a z-score equivalent of $5$, you could report that the point is as unlikely as a z-score of $5$ in a normal distribution, so pretty unlikely. $\endgroup$ – Dave Jul 30 at 22:15
  • $\begingroup$ That makes sense, thank you! $\endgroup$ – Mehdi Zare Jul 30 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.