Distinguishing variables from parameters
Imagine the following dialog.
Professor:f is a function of a real variablex that takes a real parameterk.
Student: What's a parameter?
Professor: It's a constant that can vary.
Student: Then if it can vary, isn't it a variable?
Professor: Sorta, but no not really.
This conversation plays out over and over, and unfortunately it often ends as it does above, with the student confused. Here's how I believe the conversation should continue.
Professor: You're absolutely right that f is a function of two variables,x andk. But usually k is fixed in the context of a specific application andx is not. A different application might have a different, but also fixed, value of k. So it is helpful to think off(x;k), a function ofx with a parameterk, rather thanf(x,k), a function of two variables. The former carries more information, giving a hint as to how the numbers are used.
Is there really a difference between a parameter and a variable? In a reductionistic sense, no. But in a practical sense, yes, absolutely.
It might sound pedantic to distinguish a variable from a parameter, and it is, in the best sense of the word. Pedant literally means teacher. Usually pedantic carries a negative connotation, such as making a distinction without a difference. But here the pedant would be making a helpful distinction.
For example, we might write a probability density function as f(x; , ). The function gives the probability density at a pointx. The density depends on parameters and , and these parameters change between applications, but for a given application they have fixed values.
You find the probability of a random variable taking on values in an interval [a,b] by integratingf over that interval. When I say that, you know that I mean you'd integrate with respect tox, becausef is a function ofx. It is also, in an abstract sense, a function of and , but it's typically not useful to think of it that way.
Hypergeometric functions have two sets of parameters, and so you may see two semicolons, such asf(x;a,b;c). This denotes a function of the variablex, with upper parametersa andb, and a lower parameterc. In some abstract sense this is a function of four variables, but it acts very differently with respect tox than with respect toa,b, andc. There's also a difference betweena andb on the one hand andc on the other, one worth paying attention to, though it is less of a difference than betweenx and the parameters collectively.
Sometimes you'll see a vertical bar rather than a semicolon to separate variables from parameters. This works out even better for probability densities because then f(x | , ) suggests the probability density of x given and since the vertical bar is also used for conditional probability. You might also seef(x |a, b;c) for hypergeometric functions, with the vertical bar separating variables from parameters and the semicolon separating two kinds of parameters.
When I first saw a semicolon separating variables from parameters, no explanation was given, and I figured I could mentally replace the semicolon with a comma. Then later I realized that the semicolon was an act of kindness by the author giving the reader additional information.
The post Distinguishing variables from parameters first appeared on John D. Cook.