248 {
249
250 BOOST_TEST_MESSAGE("Running regression test case 003...");
251
252
253 vector<Real> data{
254 11.357910440165, 0.301883284121, 1.690565094559, 0.028921366715, 1.445952963717, 2.683104461304,
255 2.975281862097, 0.284778609491, 3.977509941411, 2.700492214606, 3.973616990595, 1.842042909216,
256 4.507630684591, 2.188574976899, 1.839870252197, 1.653581957759, 0.301883284121, 1.545170636908,
257 1.140841711137, 0.011046063984, 0.223680967726, 0.926416050189, 0.637660185458, 1.634591590508,
258 0.328944419108, -0.321306872147, 0.490226761216, -0.228872084003, -0.466954542255, 0.908486575719,
259 1.208420546045, 1.057641385035, 1.690565094559, 1.140841711137, 4.590122578368, 0.016138328046,
260 1.681703229533, 2.722501254257, 2.941664204785, 4.088913570167, 0.753207493946, 0.750845717386,
261 2.327852200648, -0.083383166375, 0.791187240585, 3.432410532424, 4.576488134589, 4.484608491882,
262 0.028921366715, 0.011046063984, 0.016138328046, 0.003321196784, -0.002052702116, 0.015027345216,
263 0.025225956444, 0.009488292952, 0.023036962659, 0.003752073385, 0.025786900243, 0.004902517590,
264 0.017973354395, 0.013380695889, 0.016450708955, 0.015793906816, 1.445952963717, 0.223680967726,
265 1.681703229533, -0.002052702116, 5.051235107717, 1.504449552996, 1.411232675828, -0.066709336186,
266 0.740371793190, 0.922017945905, 1.423545223509, 0.592880234568, 1.318219401490, 1.512119827471,
267 1.709049165903, 1.651695766740, 2.683104461304, 0.926416050189, 2.722501254257, 0.015027345216,
268 1.504449552996, 5.896840384423, 2.736094553275, 2.318419864064, 2.683772279561, 0.869866043995,
269 2.795123680474, 0.233284568353, 1.954971283941, 2.638478800353, 2.962854214006, 2.999498221322,
270 2.975281862097, 0.637660185458, 2.941664204785, 0.025225956444, 1.411232675828, 2.736094553275,
271 3.730376993077, 2.574152890379, 2.332889913708, 1.012628826625, 2.401055859072, 0.425908702537,
272 2.104222769101, 2.846640151863, 3.254007639538, 3.174532782066, 0.284778609491, 1.634591590508,
273 4.088913570167, 0.009488292952, -0.066709336186, 2.318419864064, 2.574152890379, 8.346545067056,
274 0.111146561779, 0.061442388170, 1.440123839301, -0.532880568392, -0.363306461515, 3.164184153356,
275 4.239774387395, 4.222873062980, 3.977509941411, 0.328944419108, 0.753207493946, 0.023036962659,
276 0.740371793190, 2.683772279561, 2.332889913708, 0.111146561779, 7.816500777128, 1.306158501267,
277 1.892772141649, 1.533232314993, 2.966214070512, 1.981467787886, 0.858479274405, 0.688098796909,
278 2.700492214606, -0.321306872147, 0.750845717386, 0.003752073385, 0.922017945905, 0.869866043995,
279 1.012628826625, 0.061442388170, 1.306158501267, 3.255129750500, 1.447265157820, 1.646805443131,
280 2.024131319493, 0.823110422895, 0.661139572160, 0.726470332699, 3.973616990595, 0.490226761216,
281 2.327852200648, 0.025786900243, 1.423545223509, 2.795123680474, 2.401055859072, 1.440123839301,
282 1.892772141649, 1.447265157820, 9.307941714908, 1.003272291798, 2.960270274699, 2.637484069448,
283 2.395034154720, 2.407859255045, 1.842042909216, -0.228872084003, -0.083383166375, 0.004902517590,
284 0.592880234568, 0.233284568353, 0.425908702537, -0.532880568392, 1.533232314993, 1.646805443131,
285 1.003272291798, 2.715163222630, 1.397890009325, 0.370386734188, -0.170205201951, -0.252456813317,
286 4.507630684591, -0.466954542255, 0.791187240585, 0.017973354395, 1.318219401490, 1.954971283941,
287 2.104222769101, -0.363306461515, 2.966214070512, 2.024131319493, 2.960270274699, 1.397890009325,
288 12.145104529503, 1.291504589690, 0.751431588477, 0.731038259921, 2.188574976899, 0.908486575719,
289 3.432410532424, 0.013380695889, 1.512119827471, 2.638478800353, 2.846640151863, 3.164184153356,
290 1.981467787886, 0.823110422895, 2.637484069448, 0.370386734188, 1.291504589690, 3.304040607934,
291 3.654236283615, 3.549318308813, 1.839870252197, 1.208420546045, 4.576488134589, 0.016450708955,
292 1.709049165903, 2.962854214006, 3.254007639538, 4.239774387395, 0.858479274405, 0.661139572160,
293 2.395034154720, -0.170205201951, 0.751431588477, 3.654236283615, 5.109964090288, 4.959183419230,
294 1.653581957759, 1.057641385035, 4.484608491882, 0.015793906816, 1.651695766740, 2.999498221322,
295 3.174532782066, 4.222873062980, 0.688098796909, 0.726470332699, 2.407859255045, -0.252456813317,
296 0.731038259921, 3.549318308813, 4.959183419230, 5.024852085655};
297 Matrix covar(16, 16, data.begin(), data.end());
298
299
300 Matrix gamma(16, 16, 0.0);
301 gamma[14][14] = -0.000000000262;
302
303
304 Array delta(16, 0.0);
305 delta[14] = -247189.692289613;
306
307
308 Real p = 0.99;
310 BOOST_TEST_MESSAGE("sdvar=" << sdvar);
311
312
313 Real mcvar = deltaGammaVarMc<PseudoRandom>(covar, delta, gamma, p, 1000000, 42);
314 BOOST_TEST_MESSAGE("mcvar=" << mcvar);
315
316
317 BOOST_CHECK_CLOSE(sdvar, mcvar, 1.0);
318}