Skip to main content
added 6 characters in body
Source Link
Ken T
  • 475
  • 1
  • 4
  • 13

Depending on the context, the vertical bar in a function could have two different meanings:

  1. For example, $P(X=x|Y=y)$ could mean the probability of $X=x$ conditional upon $Y=y$, where $X$ and $Y$ are random variables and $x$ and $y$ are the corresponding realisation.
  2. On the other hand, $P(X=x| \theta)$ could mean the probability of $X=x$ given $\theta$, where $X$ is a random variable, $x$ is the corresponding realisation, and $\theta$ is a fixed parameter.

And semicolon in a function would mean fixing parameters. Consider the function $f: \mathbb{R}^2 \to \mathbb{R}$, say $(x,y) \mapsto f(x,y)$. If you would like to fix the variable $y$ in $f$ as a parameter, you are actually creating a new function $g: \mathbb{R} \to \mathbb{R}$, given by $g(x) := f(x,y)$. As a notation sugar, people would use $f(x;y)$ to represent $g(x)$.

You may notice that the meaning of semicolon is equivalent to the second meaning of vertical bar, i.e. $f(x;y)=f(x|y)$ and yes they are.

This kind of notation abuses happens in many areas. I also observed this when studying multivariable calculus.

Depending on the context, the vertical bar in a function could have two different meanings:

  1. For example, $P(X=x|Y=y)$ could mean the probability of $X=x$ conditional upon $Y=y$, where $X$ and $Y$ are random variables and $x$ and $y$ are the corresponding realisation.
  2. On the other hand, $P(X=x| \theta)$ could mean the probability of $X=x$ given $\theta$, where $X$ is a random variable, $x$ is the corresponding realisation, and $\theta$ is a parameter.

And semicolon in a function would mean fixing parameters. Consider the function $f: \mathbb{R}^2 \to \mathbb{R}$, say $(x,y) \mapsto f(x,y)$. If you would like to fix the variable $y$ in $f$ as a parameter, you are actually creating a new function $g: \mathbb{R} \to \mathbb{R}$, given by $g(x) := f(x,y)$. As a notation sugar, people would use $f(x;y)$ to represent $g(x)$.

You may notice that the meaning of semicolon is equivalent to the second meaning of vertical bar, i.e. $f(x;y)=f(x|y)$ and yes they are.

This kind of notation abuses happens in many areas. I also observed this when studying multivariable calculus.

Depending on the context, the vertical bar in a function could have two different meanings:

  1. For example, $P(X=x|Y=y)$ could mean the probability of $X=x$ conditional upon $Y=y$, where $X$ and $Y$ are random variables and $x$ and $y$ are the corresponding realisation.
  2. On the other hand, $P(X=x| \theta)$ could mean the probability of $X=x$ given $\theta$, where $X$ is a random variable, $x$ is the corresponding realisation, and $\theta$ is a fixed parameter.

And semicolon in a function would mean fixing parameters. Consider the function $f: \mathbb{R}^2 \to \mathbb{R}$, say $(x,y) \mapsto f(x,y)$. If you would like to fix the variable $y$ in $f$ as a parameter, you are actually creating a new function $g: \mathbb{R} \to \mathbb{R}$, given by $g(x) := f(x,y)$. As a notation sugar, people would use $f(x;y)$ to represent $g(x)$.

You may notice that the meaning of semicolon is equivalent to the second meaning of vertical bar, i.e. $f(x;y)=f(x|y)$ and yes they are.

This kind of notation abuses happens in many areas. I also observed this when studying multivariable calculus.

Source Link
Ken T
  • 475
  • 1
  • 4
  • 13

Depending on the context, the vertical bar in a function could have two different meanings:

  1. For example, $P(X=x|Y=y)$ could mean the probability of $X=x$ conditional upon $Y=y$, where $X$ and $Y$ are random variables and $x$ and $y$ are the corresponding realisation.
  2. On the other hand, $P(X=x| \theta)$ could mean the probability of $X=x$ given $\theta$, where $X$ is a random variable, $x$ is the corresponding realisation, and $\theta$ is a parameter.

And semicolon in a function would mean fixing parameters. Consider the function $f: \mathbb{R}^2 \to \mathbb{R}$, say $(x,y) \mapsto f(x,y)$. If you would like to fix the variable $y$ in $f$ as a parameter, you are actually creating a new function $g: \mathbb{R} \to \mathbb{R}$, given by $g(x) := f(x,y)$. As a notation sugar, people would use $f(x;y)$ to represent $g(x)$.

You may notice that the meaning of semicolon is equivalent to the second meaning of vertical bar, i.e. $f(x;y)=f(x|y)$ and yes they are.

This kind of notation abuses happens in many areas. I also observed this when studying multivariable calculus.