# Apparent discrepancy between visual and calculated Mean in Histogram

From a randonly generated normal distribution of values v:

v = RandonVariate[NormalDisrtibution[56.6*10^-9,2.5*10-9]]


I created another distribution of values and appended all in a list called vol

Clear[vol]; vol = {};

Do[AppendTo[vol, v[[i]]^3], {i, Length[v]}]


From the list vol I generated another distribution, which I called f($$\tau$$), being $$\tau$$ a function of v such as

$$\tau = \tau_0 Exp \left[\frac{M_s B_c}{2kT} v \left(1-\frac{B}{B_c}\right)^2 \right]$$

with

\[Tau]0 = 10^-10; \[Mu]0 = 4*Pi*10^-7; Bk =
10*10^-3; Ms = 157*10^3; kb = 1.38*10^-23; T=300; B=100*10^-6;


When I generate an histogram evaluating $$\tau$$ for each vol the result is

Histogram[tau0, "Log"]


The apparent mean value is ~ 10^6 based on the figure, but when I use the function Mean the result is different

In[707]:= Mean[tau0]

Out[707]= 3.72233*10^11


Does anyone know why? Any help would be great!

• Since you are plotting on a log scale, your visual interpretation will be off here. May 14, 2020 at 16:55

The transformed distribution of v has a non-vanishing third moment (i.e skew) so the median is not the same as the mean - meaning the new distribution is not symmetric about the 50% mark. This could explain why there's a lot of extra probability mass in the upper half of your logarithmic histogram if you plug the numbers in.
taudist =
$$$$
`