How to determine constant $C$ in $p(x) = Cx^{-D}$?
There are two solutions using the least square method for calculating $C$ and $D$. Both methods yield different results for your constants. There is no correct method.

Method of least Squares

We define the least square error as follows:
$$\text{lse} = \sum_{i}{\left(y_i - f(x_i)\right)^2}$$
The $y_i$ and $x_i$ are our data through that we want to fit a function $f(x)$. The aim is to reduce our error $\text{lse}$.

The solution (minimal $\text{lse}$) for a linear function $f(x) = a \cdot x + b$ is described here. The basic idea for calculating the minimum of $\text{lse}$ is to set $\partial \text{lse}/\partial a$ and $\partial \text{lse}/\partial b$ equal to $0$ and solve the resulting equation system to $a$ and $b$.

Having said that we come to two solutions for calculating $C$ and $D$ in $f(x) = C\cdot x^{-D}$

Solution 1: Logarithmize the Function

We rewrite
$$y_i = C \cdot x_i^{-D}$$
to
$$\ln{y_i} = \ln{\left(C \cdot x_i^{-D}\right)} = \ln{C} - D\cdot \ln{x_i} $$

Now we have a function of the form $\tilde{y_i} = a\cdot \tilde{x_i} + b$ with $\tilde{y_i} = \ln{y_i}$, $\tilde{x_i} = \ln{x_i}$, $a=-D$ and $b=\ln{C}$. Thus, we logarithmize our measured $x_i$ and $y_i$ values and put them into the formulas of the linear least square error method. From the resulting $a$ and $b$ we than calculate $D$ and $C$.

Solution 2: Insert the Function as it is

We set $f(x) = C\cdot x^{-D}$, insert it into our $\text{lse}$ formula:
$$ \text{lse} = \sum_i{\left(y_i - C\cdot x^{-D}\right)^2}$$
and minimize the resulting formula with respect to $C$ and $D$ for the given set of $x_i$ and $y_i$. This is a tricky and not as straight-forward as it is in the linear case. You could make $\partial \text{lse}/\partial C$ and $\partial \text{lse}/\partial D$ and look how far you come.



I personally, prefer the answer of Gordon Stanger :-) .