## WAPP+: Units of Parameters

If you use WAPP+ you will end up with a report that starts (for example):

An analysis of the data submitted indicates that a function of the form:
--Exponential-- y=A exp(Bx)
can fit the 25 data points with a reduced chi-squared of 1.2

```                FIT
PARAMETER     VALUE        ERROR
A =          1001.        3.7
B =        -0.1501       0.44E-03

NO x-errors
y-errors based on formula: SQRT(30*Y)/30
```
Evidently A is about 1000 and B is about -.15, but 1000 what? These reports are meaningless if we don't know the units of the results! Clearly the units of the found parameters depend on the units of the numbers you entered and the selected functional form. Lets denote the units for the entered x and y numbers as (respectively) [x] and [y]. In this particular case, we find below:

[A]=[y]

[B]=[x]-1

So if x was recorded in minutes and y in counts/sec,

A = 1001 ± 4 counts/sec

B = -.1501 ± 0.0004 min-1

For any functional form, you can determine the units of the parameters by applying two rules:

1. Numbers that are added, subtracted or equal to each other must have the same units.
2. The standard mathematical functions (sin, cos, exp, log, etc.) produce a unitless output and must operate on a unitless argument.
In the above case, since exp() is unitless by Rule 2a, the units of A must equal the units of y according to Rule 1. By Rule 2b, (Bx) must be unitless, so the units of B must cancel the units of x when the two are multiplied, hence [B]=[x]-1.

The linear function y=A+Bx provides an even simpler example. Since A and y are set equal to each other they must have the same units. (Of course, A is the y-intercept and so must be measured in y units.) Since A and Bx are added together, they must have the same units. SO:

[B] · [x] = [A]

[B] = [A]/[x] = [y]/[x]

(Of course, B is slope and so must have units of rise/run.)

In the case of the natural log function y=B log(x/A), B must have the same units as y (since log produces no units) and A must have the same units as x (since log must operate on a unitless argument).

The power-law function y=A xB provides an interesting example. Consider the below real data:

An analysis of the data submitted indicates that a function of the form:
--Power-- y=A xB
can fit the 25 data points with a reduced chi-squared of 1.2

```                FIT
PARAMETER     VALUE        ERROR
A =          1.001       0.12E-02
B =          1.999       0.73E-03

NO x-errors
y-errors based on formula: .003*Y
```

By Rule 2, the exponent B must be unitless, and so we have the unit equation:

[A] · [x]1.999 = [y]

[A] = [y] · [x]-1.999

While there is nothing to rule out this possibility, the laws of physics (as currently known) do not involve such funny powers of units; integer power of units: yes, common fractional powers of units: occasionally, powers of 1.999, not yet (and my bet is on never). So if this functional form is intended as a law of physics your best bet is to re-fit with B held fixed at 2. The units of A will then be as normal as the units of x. (If, on the other hand, the fit is intended as an ad hoc, phenomenological approximation of data ("saving the phenomena"); feel free to continue with the best possible B value.)

Generally folks are careful to avoid nonsense like sin(9.8m/s2), but people (including me) not uncommonly abuse log. For example:

pH = -log10([H+])

When log is being abused like this switching units just produces a uniform offset:

log10(x in cm) = log10(100*x in m) = log10(100) + log10(x in m) = 2 + log10(x in m)

Thus in phenomenological fits using something like y=A+B log(x), the B parameter is actually independent of the units used for x, while switching x units shifts A by a constant. (This can cause all sorts of confusion as (1) usually unit conversion involves multiplication not subtraction and (2) the units of x typically are absent in A, find fact it must be [y]=[A]=[B].) Similarly the standard deviation of a set of numbers { log(xi) } does not depend on the units of x and is itself properly unitless. Confusing but true!