If the sample prevalence do not reflect the real prevalence of the disease,
then the predicted values cannot be estimated and you should ignore those values.
Alternatively, when the disease prevalence is known, then the predictive values
can be calculated using the following formula's based on Bayes' theorem

$$PPV={sens×prev}/{(sens×prev)+(1-spec)×(1-prev)}$$

and

$$NPV={spec×(1-prev)}/{(1-sens)×prev+spec×(1-prev)}$$

*(where sens=Sensitivity, spec=Specificity and prev=Prevalence)*.

$$PPV={sens×prev}/{(sens×prev)+(1-spec)×(1-prev)}$$

and

$$NPV={spec×(1-prev)}/{(1-sens)×prev+spec×(1-prev)}$$

The **Adjusted** Predictive Values is in the Derived Quantities table below.

*Litt.: Statistics with Confidence (2 ^{nd} Ed.), Altman et al. BMJ Books 2000*

This page computes various statistics from a 2-by-2 table. It will calculate the Yates-corrected chi-square, the Mantel-Haenszel chi-square, the Fisher Exact Test, and other indices relevant to various special kinds of 2-by-2 tables:

- analysis of risk factors for unfavorable outcomes (odds ratio, relative risk, difference in proportions, absolute and relative reduction in risk, number needed to treat)
- analysis of the effectiveness of a diagnostic criterion for some condition (sensitivity, specificity, prevalence, pos & neg predictive values, adjusted predictive values, pos & neg likelihood ratios, diagnostic and error odds ratios)
- measures of inter-rater reliability (% correct or consistent, mis-classification rate, kappa, Forbes' NMI)
- other measures of association (contingency coefficient, Cramer's phi coefficient, Yule's Q)

Many of these concepts are explained in detail in an online
Evidence-based Medicine Glossary or Center for Evidence-based Medicine.
For more information about a particular index, click on the <__more info__> link for that index.

**Confidence intervals** for the estimated parameters are computed by a general method (based on "constant chi-square boundaries") given in:
*Statistical Methods for Rates and Proportions* (2^{nd} Ed.)
Section 5.6, by Joseph L. Fleiss (Pub: John Wiley & Sons, New York, 1981).
This method is also described in Numerical Recipes in C (2nd Ed.) Section 15.6, by William H. Press et al. (Pub: Cambridge University Press, Cambridge UK, 1992).

Wilson's method is used to find CI for adjusted predictive values. Ref: *Statistics with Confidence (2 ^{nd} Ed.)*
by DG Altman et al. (Pub: British Medical Journal Books, UK 2000) p. 46-7.

The reference used for CI calculation for RIOC is: Relative Improvement Over Chance (RIOC) and Phi as Measures of Predictive Efficiency and Strength of Association in 2 × 2 TablesDavid P. Farrington and Rolf Loeber. Journal of Quantitative Criminology, Vol. 5, No. 3 (September 1989), p. 201-213.