# Could someone give an example to illustrate "a family of curves parallel to the x-axis"?

This wiki page says

From a geometric standpoint, if we consider $$f(x|\theta)$$ as a function of two variables then the family of probability distributions can be viewed as a family of curves parallel to the x-axis, while the family of likelihood functions is the orthogonal curves parallel to the $$\theta$$-axis.

I cannot imagine what this kinds of parallel look like.

Consider this particular figure (fig_1), there are 3 distributions. I assume these are a family of probability distributions, if there is someone having different opinions about family of probability distributions, please discussed here. there are 3 curves in the figure, it seems not to be reasonable to say the curves parallel to the x-axis.

Is my understanding correct?

this is the Python code to plot that figure (fig_1)

sigma_values = [0.5, 1.0, 2.0]
linestyles = ['-', '--', ':']
mu = 0
x = np.linspace(-10, 10, 1000)
fig, ax = plt.subplots(figsize=(5, 3.75))

for sigma, ls in zip(sigma_values, linestyles):
# create a gaussian / normal distribution
dist = norm(mu, sigma)

plt.plot(x, dist.pdf(x), ls=ls, c='black',
label=r'$$\mu=%i,\ \sigma=%.1f$$' % (mu, sigma))


the most confusing part is "curves parallel", according to my understanding a parallel of curves should looks like as follow (fig_2) Is that implying a 3d surface where some contour lines are parallel? Is it reasonable to say the plotted contour lines are parallel to x-axis in this link?

• Consider the function $f:\mathbb{R^2} \to \mathbb{R}$ given by $f(x,sigma) = \frac{1}{\sqrt{2\pi\sigma}}e^{-x^2/(2\sigma)}$. Then, $x$ is on the $x$-axis, whereas $\sigma$ is on the $y$ and orthogonal to $x$. In essence, you take a family of $1$ d functions and turn it into a $2$-d function Oct 13, 2019 at 7:46
• @rubikscube09 Thanks for your comments. Is this a function of 𝑠𝑖𝑔𝑚𝑎 or a function of x? Oct 13, 2019 at 7:59
• It is a function of both! Oct 13, 2019 at 8:03
• @rubikscube09 Thank you! Would you please provide a piece of Python or R code to plot your function or existing figure for that? I still cannot get the point. Oct 13, 2019 at 8:12
• You are right that the explanation is misleading. Think of a 3D plot $z = f(x,\sigma)$, as can be seen here. You can see two families of grid lines on the surface, one for fixed $\sigma$ and varying $x$, and one for fixed $x$ and varying $\sigma$. The former represents the probability distributions for given $\sigma$, the latter represents the likelihood functions for given $x$.
– user856
Oct 13, 2019 at 9:02

Translated into more plain words, if you are given a $$z=f(x,y)$$ and fix a value of $$y$$ to be $$y=y_0$$ then $$f(x,y_0)$$ would be an $$f_{y_0}(x)$$ lying onto the plane $$y=y_0$$, which is "a plane parallel to the $$x$$ (and $$z$$) axis" in the 3D environment. Sorry, I do not know Python (unfortunately).
I did the above with my old Mupad, with the following code

    f:=(x,s)->1/sqrt(2*PI*s)*exp(- x^2/(2*s)):
plot(
plot::Function3d(f(x,s),x=-5..5, s=1/4..4),
plot::Plane([0,1/2,0],[0,1,0]),
plot::Plane([0,1,0],[0,1,0]),
plot::Plane([0,2,0],[0,1,0])
);

• Thanks for your answer. Would you please give a concrete example like mine so that I can actually plot the distributions? Oct 13, 2019 at 8:37
• @baojieqh: don't catch what is actually your problem. Is it about wording, or about code ? I replied for the "parallel" interpretation. For code, you already did it fixing some values for sigma and plotting vs. x, and suppose you can easily do the contrary, fixing some values for x and plotting vs. sigma. Oct 13, 2019 at 9:13
• Thanks for your patience! The figure (fig_1) illustrates a family of probability distributions where sigma are fixed at [0.5, 1.0, 2.0] although the 3 curves does not seems to be parallel. Oct 13, 2019 at 9:30
• @baojieqh: in my answer I tried and explained that the adjective "parallel" is not actually referred to a relation among the curves themselves, but actually to the planes in which they lie in 3D. Oct 13, 2019 at 9:55
• That why I appreciated your answer very much. And I did get the concept of "a plane parallel to the 𝑥 (and 𝑧) axis" in the 3D environment. Would you help me to apply this concept on my code and figure (fig_1)? For instance, there 3 curves in fig_1. What plane do they live on in 3D? What is the relationship between those 3 curves and any other curves or lines in the context of parameters [0.5, 1.0, 2.0]? Oct 13, 2019 at 10:10