Difference between variable and parameter

In summary, a variable is something you input into a function and get a certain value from it, while a parameter is something that gives you a different function but is 'adjusted'. A constant, such as the constant C that translates a graph of a function up and down, would be considered a parameter. However, in parametric equations like sin(t) and cos(t), the 'parameter' t is acting like a variable, where you can input a value and get a point on the graph. The terminology for variables, parameters, and constants can be inconsistent and may depend on the context in which they are used. In mathematics, these terms are used to denote logical distinctions, but they all ultimately refer to the same thing.
  • #1
autodidude
333
0
From what I think I understand, a variable is something you input into a function and you get a certain value from it whereas a parameter is something that gives you a different function but 'adjusted'...so the constant C the translates a graph of a function up and down would be a parameter...is this correct?

But then, when you have parametric equations like sin(t) and cos(t), isn't the 'parameter' t acting like a variable where you put in a value and get a point somewhere on the graph?
 
Mathematics news on Phys.org
  • #2
The terminology is sometimes at contradiction with other terminology depending on the field.

In a parameterization, we are usually talking about a situation where we describe some particular object in terms of it's completely reduced form with parameters that are orthogonal and can be used to construct the object.

So in your case the (sin(t),cos(t)) pair represents a circle with a parameterization of one variable because the object can be reduced down to one parameter.

In statistics however, a parameter is usually considered to be a constant when describing distributions in the frequentist viewpoint. Parameters can be considered as random variables, but typically the purpose of a parameter is going to be that given the value of a parameter, we get an explicit form of a distribution in terms of it's PDF.

But the best way to think about this is that variables have variation: i.e. they can take on more than one value. Typically parameters don't, but if you think about a parameterization then this is false.

It's better to just look at the set definition of some object and see what the definition is.

Also another thing that might help to see if something is "constant" is to see if it is dependent with any of the other parameters. You can look at the derivatives to see if this is the case.

For example let y = cx. If dy/dc = 0 and dc/dy = 0 then it means that these are independent variables since changing one will not affect the other in any other way: the relationship must be both ways. Also checking dx/dc = dc/dx = 0 checks the same thing for y.

The idea for this is based on the inverse function theorem and if you can not find an inverse function for c -> x or x -> c then you have shown they are independent.

Just as a thought exercise consider the system x = 2 y = 4 and z = 7 and consider all possible derivatives. Then let y = 4x and do the same thing.
 
  • #3
autodidude said:
From what I think I understand, a variable is something you input into a function and you get a certain value from it whereas a parameter is something that gives you a different function but 'adjusted'...so the constant C the translates a graph of a function up and down would be a parameter...is this correct?

But then, when you have parametric equations like sin(t) and cos(t), isn't the 'parameter' t acting like a variable where you put in a value and get a point somewhere on the graph?

These are both vague terms. You can't trust anyone to use these terms consistently.

It is important to keep track of which variables are constant with respect to other variables, but this can get arbitrarily complicated, depends on context, and seems never to have been formalized. You just have to read carefully and try to figure out what each author is saying. It doesn't help that English is a second language for many authors.
 
  • #4
autodidude,

If you could translate statements from math books into what mathematics itself regards as formal logic, a symbol such as "c" will be within the "scope" of some quantifier, such as "for each" or "there exists". Thus it will be a variable of some sort. (Think of how computer programs are written. A symbol like "c" in one function need not mean the same thing as a "c" in another function. The "scope" of what a given "c" means in computer code is limited or extended using various conventions of the programming language.)

However, as imaLooser observes, most math and physics books use "natural language" and this has ambiguities and (to be frank about it) inconsistencies. A book asks you to think of a symbol like "c" as a constant and then in the next paragraph it may talk about varying "c". The analogy with computer programming is that a function might have an read-only input variable named "c" and within the function "c" is constant. However, in a larger view of things, the function can be called using different values of "c". So answering the question "Is 'c' a variable or a constant?" depends on your viewpoint.

You are correct that the terminology "parameter" is usually used to describe how "families" of things (such a functions) are indexed. However, this is simply a cultural convention - just a common style of writing. Whether you are supposed to pretend a "parameter" is a constant or a variable will depend on the viewpoint the book is taking at the moment.
 
  • #5
There is no technical difference. The terms variable, argument and parameter are all indicative of the fact that the function depends on the entity labeled with one of them. So functions can end up in equations imposed on any of them, differentiated or integrated with respect to any of them, and so on. The different terms are used merely to denote some sort of logical distinction. For example, in mechanics, mass is usually seen as a constant, so it is a parameter as opposed to the variables of motion.
 
  • #6
ImaLooser said:
It doesn't help that English is a second language for many authors.

In this particular case, keep in mind that the terms argument, parameter and variable all appeared and became entrenched in Latin-language mathematical texts in 17-19 centuries. From where they migrated, often verbatim, into mathematical texts in national languages. So they all denote the same thing to mathematicians no matter what their mother tongue is.
 

1. What is the difference between a variable and a parameter?

A variable is a placeholder for a value that can change and be manipulated in a program, while a parameter is a variable that is passed into a function or method to customize its behavior.

2. Can a variable also be a parameter?

Yes, a variable can also be a parameter if it is used as an input for a function or method.

3. How are variables and parameters declared?

Variables are declared by assigning a name and a value, while parameters are declared in the parentheses of a function or method and are separated by commas.

4. What is the scope of a variable compared to a parameter?

A variable's scope is limited to the block of code in which it is declared, while a parameter's scope is limited to the function or method in which it is used.

5. Can the value of a parameter be changed within a function or method?

Yes, the value of a parameter can be changed within a function or method, but it will only affect the function or method's local scope and not the original value of the parameter outside of the function or method.

Similar threads

  • General Math
Replies
13
Views
2K
  • General Math
Replies
7
Views
1K
Replies
2
Views
1K
  • Electrical Engineering
Replies
4
Views
294
Replies
7
Views
972
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
894
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
426
Replies
26
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
1K
Back
Top