9
$\begingroup$

I'm reading from a book that introduces the Dirchilet distribution and then presented figures about it. But I was not really able to understand those figures. I attached the figure here at the bottom. What I don't understand are the meanings of the triangles.

Normally when one wants to plot a function of 2 variables, you take the value of var1 and va2 and then plot the value of the function value of those two variables ... which gives a visualization in a 3D dimension. But here there are 3 dimensions and one other value for the function value so it makes a visualization in 4D space. I can't understand those figures!

I hope someone can clarify them please!

EDIT: here is what I don't understand from figure 2.14a. So we have drawn from K=3 dirichlet a sample theta (which is basically a vector) that is: theta = [theta1, theta2, theta3]. The triangle plots [theta1, theta2, theta3]. The distance from the origin to each theta_i is the value of theta_i. Then for each theta_i it put a vertex and connected all three verteces and made a triangle. I know that if I plug [theta1, theta2, theta3] into dir(theta|a) I will get one number which is the joint probability of the vector theta. I also understand that the probability for continuous random variables is a measure of an area. But here we have 3 dimensions so the joint probability will be the measure of the volume of the space from the pink plane and under ... i.e the pyramid. Now I don't understand what is the role of the triangle here. What is it trying to communicate or visualize?

enter image description here

$\endgroup$
  • 2
    $\begingroup$ I suggest you start from beta distribution and work from there. The Dirichlet for 3 is "just" a logical extension of beta, which is the Dirichlet for 2. $\endgroup$ – Andris Birkmanis Jan 3 '14 at 16:37
  • $\begingroup$ Check this thread for an example: stats.stackexchange.com/questions/244917/… $\endgroup$ – Tim Aug 8 '17 at 12:13
  • $\begingroup$ It can be helpful to think that a Beta distribution is shown in 2D (x-axis representing the {0,1} binary outcome and the y-axis representing the probability) so a ternary outcome need the extra dimension, right? $\endgroup$ – George Apr 22 at 10:40
4
$\begingroup$

I don't understand what is the role of the triangle here. What is it trying to communicate or visualize?

All points in the triangle must satisfy the two constraints: between zero and one in each dimension ($0 \leq \theta \leq 1$) and all sum up to one ($\theta_0 + \theta_1 + \theta_2 = 1$).

The way I finally understood it is the following:

figure

So (a) shows a 3-D space with $\theta_{1, 2, 3}$ as coordinates. They range only between 0 and 1.

In (b), a triangle is shown, this is our simplex.

(c) shows two example points that "lay" on the simplex which also fulfil the second criteria (sums up to one).

(d) shows another example point on the simplex, the same constraints hold

In (e), I tried to show a projection of the simplex to a 2-D triangle with all example points shown before.

Hope it makes more sense now :)

$\endgroup$
  • 2
    $\begingroup$ Nice picture. Is it yours? If no, could you please provide a reference and it's source? $\endgroup$ – Tim Aug 8 '17 at 12:12
  • 1
    $\begingroup$ Thanks. It's mine (drawn using Inkscape), I can provide the SVG if needed... $\endgroup$ – John Doe Aug 9 '17 at 9:46
2
$\begingroup$

Graph 2.14(a) shows a plane made by three vertices on each axis. The distance of a vertex from the origin is $\theta_i$, corresponding to one of the $k=3$ classes. The region enclosed by the pink plane and the planes of the axes is probability of (vector) $\theta$. Now suppose that you tilt that plane so that you have a pyramid with the pink plane, the face nearest to the reader, placed flat on the page. Then suppress the third dimension "popping out" of the page, and instead color the triangle so that the higher density region, with a longer distance from the base to a surface, is more red. That's what graphs 2.14(b) and 2.14(c) show. The more the red is concentrated near a vertex, the more probable the class associated with that vertex. Likewise, if the red region is not very near to any vertex, it is not especially likely that an event has higher probability of membership in any of the classes.

This pyramid, though, only makes sense as a single realization of the Dirichlet distribution. Drawing again from the same distribution might yield a different pyramid with different lengths $\theta$ to each of the vertices. The key difference between (a) and (b)/(c) is that (a) graphically displays the probability of one draw of vector $\theta$. Graphs (b) and (c) show the probability density for values $\theta$ in the $k=3$ simplex, that is, they're attempting to present the probability density function for all values $\theta$ in the support. One way to think about (b) and (c) is as a point having additional red color according to the average height between the flat pink plane and the surface of the pyramid, averaged over many draws of $\theta\sim\text{Dir}(\alpha)$.

$\endgroup$
  • $\begingroup$ Some points still not clear. Maybe cuz of my weak English. "The region enclosed by the pink plane and the planes of the axes is the density." Is that the empty space of the pyramid under pink plane? Also "density"? What do you mean? Like what I understand is that dir(x1,x2,x3) is one value, how does the density here come into the graph? $\endgroup$ – Jack Twain Jan 3 '14 at 16:14
  • $\begingroup$ Yes, between the pink plane and the planes formed by the black lines in 2.14(a) is the space of the pyramid that I was trying to describe. Sorry for the confusion! $\endgroup$ – Sycorax Jan 3 '14 at 16:16
  • $\begingroup$ I will edit my post to explain further what is not clear still $\endgroup$ – Jack Twain Jan 3 '14 at 16:17
  • $\begingroup$ the thing is the pink region is exactly the support described in the book. since theta_k <=1 and sum(theta_k) =1. Once you picture that, user777 is totally right. $\endgroup$ – Scratch Jan 3 '14 at 16:25
  • $\begingroup$ @user777 I just made an edit to the post $\endgroup$ – Jack Twain Jan 3 '14 at 16:28

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.