Czy mogę wykorzystać momenty rozkładu do próbkowania rozkładu?


14

Zauważam, że w metodach statystycznych / uczenia maszynowego rozkład jest często aproksymowany przez Gaussa, a następnie Gaussian jest wykorzystywany do próbkowania. Zaczynają od obliczenia pierwszych dwóch momentów rozkładu i wykorzystują je do oszacowania i . Następnie mogą pobrać próbki z tego gaussowskiego.μσ2

Wydaje mi się, że im więcej chwil obliczam, tym lepiej powinienem być w stanie przybliżać rozkład, który chcę próbkować.

Co się stanie, jeśli obliczę 3 momenty ... jak mogę wykorzystać je do pobrania próbki z rozkładu? Czy można to rozszerzyć na N momentów?


2
Trzy momenty nie determinują formy dystrybucyjnej *; jeśli wybierzesz rozkład-rodzinę z trzema parametrami, które odnoszą się do pierwszych trzech momentów populacji, możesz wykonać dopasowanie momentu („metoda momentów”), aby oszacować trzy parametry, a następnie wygenerować wartości z takiego rozkładu. Istnieje wiele takich dystrybucji.[* Rzeczywiście, czasami nawet posiadanie wszystkich chwil nie wystarcza do ustalenia rozkładu.]
Glen_b

Dzięki, @Glen_b! Przeczytam o „metodzie chwil”, aby zrozumieć, kiedy jest to możliwe. Czy możesz wskazać mi teorię, która opisuje, kiedy chwile nie są wystarczające do ustalenia rozkładu?
curious_dan

„Metoda momentów” mówi tylko, jak oszacować parametry na podstawie momentów. Pozostała część twojego komentarza to nowe pytanie (myślę, że już na nie odpowiedzieli na stronie); krótko - jeśli istnieje funkcja generowania momentu (w sąsiedztwie 0), wówczas jednoznacznie identyfikuje rozkład (technicznie rzecz biorąc, można w zasadzie wykonać odwrotną transformatę Laplace'a). Oczywiście, jeśli niektóre chwile nie są skończone, oznaczałoby to, że mgf nie istnieje, ale są też przypadki, w których wszystkie chwile są skończone, ale mgf wciąż nie istnieje w sąsiedztwie 0 ..
Glen_b

Piszę odpowiedź na podstawie mojego komentarza.
Glen_b

Odpowiedzi:


22

Trzy momenty nie determinują formy dystrybucji; jeśli wybierzesz rozkład-rodzinę z trzema parametrami, które odnoszą się do pierwszych trzech momentów populacji, możesz wykonać dopasowanie momentu („metoda momentów”), aby oszacować trzy parametry, a następnie wygenerować wartości z takiego rozkładu. Istnieje wiele takich dystrybucji.

Czasami nawet posiadanie wszystkich chwil nie wystarcza do ustalenia rozkładu. Jeśli istnieje funkcja generowania momentu (w sąsiedztwie 0), wówczas jednoznacznie identyfikuje rozkład (można w zasadzie wykonać odwrotną transformatę Laplace'a, aby ją uzyskać).

[Jeśli niektóre momenty nie są skończone, oznaczałoby to, że mgf nie istnieje, ale są też przypadki, w których wszystkie momenty są skończone, ale mgf nadal nie istnieje w sąsiedztwie 0.]

Biorąc pod uwagę wybór rozkładów, można pokusić się o rozważenie maksymalnego rozwiązania entropii z ograniczeniem na pierwsze trzy momenty, ale nie ma rozkładu na linii rzeczywistej, który go osiągnie (ponieważ wynikowa wartość sześcienna wykładnika będzie nieograniczona).


Jak przebiegałby ten proces w przypadku konkretnego wyboru dystrybucji

Można uprościć proces uzyskania dopasowania dystrybucji, trzech momentów, pomijając średnia i wariancja i współpracuje z skalowany trzeci moment - chwila asymetrii ( γ1=μ3/μ23/2 ).

Możemy to zrobić, ponieważ po wybraniu rozkładu z odpowiednią skośnością, możemy następnie wycofać pożądaną średnią i wariancję poprzez skalowanie i przesunięcie.

Rozważmy przykład. Wczoraj utworzyłem duży zestaw danych (który nadal zdarza się w mojej sesji R), którego rozkładu nie próbowałem obliczyć funkcjonalnej postaci (jest to duży zestaw wartości dziennika wariancji próbki Cauchyego w n = 10). Mamy pierwsze trzy nieprzetworzone momenty, odpowiednio 1,519, 3,597 i 11,479, lub odpowiednio średnią 1,518, odchylenie standardowe * 1,136 i skośność 1,429 (więc są to wartości próbek z dużej próbki).

Formalnie metoda momentów próbowałaby dopasować momenty surowe, ale obliczenia są prostsze, jeśli zaczniemy od skośności (przekształcenie rozwiązywania trzech równań w trzech niewiadomych w rozwiązywanie dla jednego parametru na raz, znacznie prostsze zadanie).

* Zamierzam ręcznie rozróżnić różnicę między użyciem mianownika n wariancji - co odpowiadałoby formalnej metodzie momentów - a mianownikiem n-1 i po prostu użyć przykładowych obliczeń.

Ta skośność (~ 1,43) wskazuje, że szukamy rozkładu, który jest pochylony w prawo. Mógłbym wybrać na przykład przesunięty rozkład logarytmiczno-normalny (logarytm normalny o trzech parametrach, kształt σ , skala μ i przesunięcie położenia γ ) z tymi samymi momentami. Zacznijmy od dopasowania skosu. Skośność populacji lognormalnej dwuparametrowej wynosi:

γ1=(eσ2+2)eσ21

σ2σ~2

γ12(τ+2)2(τ1)τ=eσ2τ3+3τ24=γ12. Using the sample skewness in that equation yields τ~1.1995 or σ~20.1819. (The cubic has only one real root so there's no issue with choosing between roots; nor is there any risk of choosing the wrong sign on γ1 -- we can flip the distribution left-for-right if we need negative skewness)

We can then in turn solve for μ by matching the variance (or standard deviation) and then for the location parameter by matching the mean.

But we could as easily have chosen a shifted-gamma or a shifted-Weibull distribution (or a shifted-F or any number of other choices) and run through essentially the same process. Each of them would be different.

[For the sample I was dealing with, a shifted gamma would probably have been a considerably better choice than a shifted lognormal, since the distribution of the logs of the values was left skew and the distribution of their cube root was very close to symmetric; these are consistent with what you will see with (unshifted) gamma densities, but a left-skewed density of the logs cannot be achieved with any shifted lognormal.]

One could even take the skewness-kurtosis diagram in a Pearson plot and draw a line at the desired skewness and thereby obtain a two-point distribution, sequence of beta distributions, a gamma distribution, a sequence of beta-prime distributions, an inverse-gamma disribution and a sequence of Pearson type IV distributions all with the same skewness.

We can see this illustrated in a skewness-kurtosis plot (Pearson plot) below (note that β1=γ12 and β2 is the kurtosis), with the regions for the various Pearson-distributions marked in.

Pearson plot with desired skewness line drawn in

The green horizontal line represents γ12=2.042, and we see it pass through each of the mentioned distribution-families, each point corresponding to a different population kurtosis. (The dashed curve represents the lognormal, which is not a Pearson-family distribution; its intersection with the green line marks the particular lognormal-shape we identified. Note that the dashed curve is purely a function of σ.)


More moments

Moments don't pin distributions down very well, so even if you specify many moments, there will still be a lot of different distributions (particularly in relation to their extreme-tail behavior) that will match them.

You can of course choose some distributional family with at least four parameters and attempt to match more than three moments; for example the Pearson distributions above allow us to match the first four moments, and there are other choices of distributions that would allow similar degree of flexibility.

One can adopt other strategies to choose distributions that can match distributional features - mixture distributions, modelling the log-density using splines, and so forth.

Frequently, however, if one goes back to the initial purpose for which one was trying to find a distribution, it often turns out there's something better that can be done than the sort of strategy outlined here.


2

So, the answer is generally NO, you can't do this, but sometimes you can.

When you can't

The reasons you can't do this usually are two folds.

First, if you have N observations, then at most you can calculates N moments. What about the other moments? You can't simply set them to zero.

Second, higher moments calculations become less and less precise, because you have to raise the numbers into higher powers. Consider 100th non-central moment, you can't usually calculate it with any precision:

γ100=ixi100n

When you can

Now, sometimes you can get the distribution from moments. It's when you make an assumption about the distribution of some sort. For instance, you declare that it's normal. In this case all you need is just two moment, which can be calculated with decent precision, usually. Note, that normal distribution has higher moments, indeed, e.g. kurtosis, but we don't need them. If you were to calculate all moments of the normal distribution (without assuming it's normal), then tried to recover the characteristic function to sample from the distribution, it wouldn't work. However, when you forget about the higher moments and stick to the first two, it does work.

Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.