Calculate combined standard deviation
If you're wanting an estimate of the standard error for eq
, one approach is to use the Delta Method (a.k.a Propagation of Error if you're in the physical sciences).
(* Data from first example in `NonlinearModelFit` documentation *)
data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}, {6, 4}, {7, 5}};
nlm = NonlinearModelFit[data, Log[c1 + c2 x^2], {c1, c2}, x]
eq = (2.303*((70 + 273.15)^2)*(c1/c2))/1000
(* (271.183 c1)/c2 *)
eq /. nlm["BestFitParameters"]
(* 286.391 *)
f = D[eq, {{c1, c2}}] /. nlm["BestFitParameters"]
(* {190.126, -200.789} *)
se = (f.nlm["CovarianceMatrix"].f)^0.5
(* 261.115 *)
More work but better if the desired function estimator does not have an approximate normal distribution is to use a bootstrap approach.
Addition:
I should note that the true standard error almost certainly doesn't exist as the ratio of two normals have no finite moments. However, the "estimate of the standard error" can (depending on the values of the distributions of the estimators) provide a reasonable confidence interval for the estimate of the ratio (such as in +/- 1.96 standard errors).
Assuming the c1/c2 estimates came from a large sample, the eq
has a non-central ratio of Gaussians distribution. You'd have to simulate or use NExpectation
here:
dc1 = NormalDistribution[8.08318, 0.692171];
dc2 = NormalDistribution[21.1577, 3.13379];
td = TransformedDistribution[(2.303*((70 + 273.15)^2)*(c1/c2))/1000
, {c1 \[Distributed] dc1, c2 \[Distributed] dc2}];
(* random experiment *)
tdrvts = RandomVariate[td, 1000000];
Histogram[tdrvts]
StandardDeviation[tdrvts] (* around 19.2 *)
(* attempt a near-exact mean and stddev *)
meanEst = NExpectation[x, x \[Distributed] td] (* 106.046 *)
mseEst = Sqrt[Quiet@NExpectation[(x - meanEst)^2, x \[Distributed] td]] (* 19.4 *)