-1
$\begingroup$

I have a dataset, X, of real numbers, x, that I assume they follow a Lognormal distribution. Based on this, the distribution Y(y), y=LN(x), is Gaussian.

Compute the parameters of X and Y, the mean value, standard deviation value and ultimately the coefficient of variation value.

Questions:

Given
    X ~ Lognormal ⁡ (μX , σX)
    Y ~ Normal ⁡ (μY , σY)

> For Y: an estimate of the mean value is μY an estimate of the standard
> deviation value is σY an estimate of the CoV value is σY/μY
> 
> For X: an estimate of the mean value is exp(μX + σX^2/2) an estimate
> of the standard deviation value is SQRT[exp(σX^2) − 1]*exp(2μX +
> σX^2)] an estimate of the CoV value is SQRT[exp(σX^2) - 1]

1- Should μX = μY and σX = σY? Or are (μ , σ) calculated for each Dataset X and Y?

2- What are the expressions that relate the parameters, mean, standard deviation and CoV of X and Y?

Example:

import numpy as np
import pandas as pd

np.random.seed(0)
LNd = pd.DataFrame(np.random.lognormal(mean=0.0, sigma=1.0, size=1000000), columns=['Values'])

mX = np.mean(LNd.values)
sX = np.std(LNd.values)
print(mX, sX)

Nd = LNd['Values'].apply(lambda x: np.log(x))
Nd.columns = ['Values']

mY = np.mean(Nd.values)
sY = np.std(Nd.values)
print(mY, sY)

emX=np.exp(mY+(sY**2)/2)
esX=(np.exp(2*mY+2*(sY**2))-np.exp(2*mY+(sY**2)))**0.5
print(emX, esX)

emY=np.log(mX)-(sX**2)/2
esY=(np.log(1+(sX/mX)**2))**0.5
print(emY, esY)

Why is emy not equal to mY? In other references (wikipedia) there are other expressions but still emy is not equal to mY.

$\endgroup$
  • $\begingroup$ Can you please explain why emy should be mY? $\endgroup$ – kasa Jul 17 '18 at 16:16
  • $\begingroup$ I used the formula provided in sciencedirect.com/science/article/pii/S0168900213008450 to relate the mean value of Y with the mean value of X. $\endgroup$ – jpcgandre Jul 17 '18 at 16:19
  • $\begingroup$ Why the downvote without a comment? $\endgroup$ – jpcgandre Jul 17 '18 at 16:39
  • $\begingroup$ It's difficult to determine what you are asking: are you computing values for distributions or estimating them from data? If it's estimates from data, why aren't you just applying standard Normal-theory estimates using the logs of the data? If it's from distributions, then all your questions are answered at stats.stackexchange.com/questions/132855/…. $\endgroup$ – whuber Jul 17 '18 at 23:42
  • $\begingroup$ Hi, I want to see if it's possible to obtain the mean and stdev of a LN dist. based on the mean and stdev of a Normal dist. What I show in my example is that by using the formulas supplied in web references (such as the one you provided) you don't achieve it. Why and what are the correct formulas (for mean value in particular)? $\endgroup$ – jpcgandre Jul 18 '18 at 0:25
1
$\begingroup$

This is a good introductory question in Probability and Statistics, so I won't deprive you of the fun by answering it in detail.

First thing we need to understand is that Log normal distribution (X) ranges only on the positive real axis whereas the normal distribution (Y) ranges over the entire real axis. So, clearly,

  1. $\mu_x \ne \mu_y$ You need to take the individual means of X and Y datasets. Read up about convex functions and figure out if $\mu_x >=< \mu_y$. Worth it!
  2. Variance usually reduces by taking a log-transformation. So, we can expect that $\sigma_x > \sigma_y$. Now think, what happens to the Covariance because of this reduction in variance effect.
$\endgroup$
  • $\begingroup$ Thanks! My second question is not directly about larger than, lower than considerations but what are the expressions that relate the variables of the two distributions? $\endgroup$ – jpcgandre Jul 17 '18 at 15:56
  • $\begingroup$ en.wikipedia.org/wiki/Log-normal_distribution has all the necessary expression you are looking for. E.g. $E(X)=Exp(\mu_y+0.5*\sigma_y^2)$ Try to work them out. In case, you are not able to get the exact expressions, put up your attempt, we all will help you out. $\endgroup$ – kasa Jul 17 '18 at 16:02

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.