Reputation: 6886
I need to calculate the probability of missed detection for a certain threshold t, where the chi square distribution has non centrality parameter lambda.
I tried to understand the boost probability fun, but so far I did not come up with something working.
boost::math::non_central_chi_squared mydist(n, lambda);
boost::math::cdf(mydist, t); // probability that value is taken less than or equal
boost::math::cdf(complement(mydist, t)); // probability that value is taken greater or equal
gives to probability that a pick is below or above t.
How do I get reverse mapping a given probability p
to a threshold t
?
Upvotes: 1
Views: 121
Reputation: 6886
boost::math::chi_squared mydist(n);
x = boost::math::qunatile(complement(mydist, pfa));
boost::math::non_central_chi_squared mydist(n, lambda);
y = boost::math::quantile(mydist, pmd);
where pfa
is the probability of false alert and pmd
the probability of missed detection
Upvotes: 1