{"uid":"cap_8K4XwQnAq8tRZBAFFeQym","slug":"saylor-innovations-data-desk-bayesian-diagnostic-test-calculator-8d8c9a27","name":"Saylor Innovations Data Desk – Bayesian Diagnostic Test Calculator","description":"Bayes calculator for a diagnostic test - positive and negative predictive value, likelihood ratios and a confusion matrix from prevalence, sensitivity and specificity","url":"https://saylorinnovations.com/api/stats/bayes?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["prevalence_percent","sensitivity_percent","specificity_percent"],"properties":{"prevalence_percent":{"type":"string","description":"How common the condition is, percent"},"sensitivity_percent":{"type":"string","description":"True positive rate, percent"},"specificity_percent":{"type":"string","description":"True negative rate, percent"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["inputs","positive_predictive_value_percent"],"properties":{"note":{"type":"string","description":"Caveat or context for reading the result"},"inputs":{"type":"object","properties":{"population":{"type":["number","null"],"description":"Population size used for the confusion matrix"},"prevalence_percent":{"type":["number","null"],"description":"Prevalence, as a percentage"},"sensitivity_percent":{"type":["number","null"],"description":"Sensitivity, as a percentage"},"specificity_percent":{"type":["number","null"],"description":"Specificity, as a percentage"}},"description":"Inputs after validation, as percentages and the population size"},"source":{"type":"string","description":"Data source the values come from"},"plain_language":{"type":["string","null"],"description":"Plain language"},"confusion_matrix":{"type":"object","description":"Confusion matrix"},"false_discovery_percent":{"type":["number","null"],"description":"False discovery, as a percentage"},"negative_likelihood_ratio":{"type":["number","null"],"description":"Negative likelihood ratio"},"positive_likelihood_ratio":{"type":["number","null"],"description":"Positive likelihood ratio"},"negative_predictive_value_percent":{"type":["number","null"],"description":"Negative predictive value, as a percentage"},"positive_predictive_value_percent":{"type":["number","null"],"description":"Positive predictive value, as a percentage"},"probability_of_positive_test_percent":{"type":"number","description":"Probability of positive test, as a percentage"},"probability_disease_given_negative_percent":{"type":["number","null"],"description":"Probability disease given negative, as a percentage"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9osLlaWCJZiPaZ_JETGmn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates positive/negative predictive values, likelihood ratios, false discovery rate, and a confusion matrix for a diagnostic test given prevalence, sensitivity, and specificity","exampleAgentPrompt":"Run a Bayes diagnostic calculator for a test with 5% prevalence, 90% sensitivity, and 95% specificity — I want the positive and negative predictive values, likelihood ratios, and false discovery rate.","exampleUseCases":[{"title":"Evaluating COVID screening test reliability","prompt":"For a COVID rapid test with 8% population prevalence, 85% sensitivity, and 97% specificity, what are the positive and negative predictive values and how many false positives would I expect?"},{"title":"Assessing rare disease genetic test accuracy","prompt":"I'm looking at a genetic test for a condition with 0.5% prevalence, 99% sensitivity, and 99% specificity — can you calculate the PPV, NPV, and likelihood ratios so I know how much to trust a positive result?"},{"title":"Calibrating cancer screening program","prompt":"Our mammography screening program has a 1.2% prevalence in the target population, 80% sensitivity, and 90% specificity — run the Bayes numbers and give me the confusion matrix and plain-language interpretation."}],"resultDescription":"Returns a JSON object with validated inputs, positive predictive value (percent), negative predictive value (percent), positive and negative likelihood ratios, false discovery rate (percent), a confusion matrix showing true/false positives and negatives, a plain-language summary, and optional notes providing clinical context.","failureModes":["Missing required query parameters (prevalence_percent, sensitivity_percent, specificity_percent) returns an error","Values outside valid range (e.g. >100 or negative percentages) may return validation errors or null fields","Extreme edge cases (0% prevalence or 100% specificity) may produce undefined likelihood ratios","Non-numeric string values for percent fields will cause parsing failures"],"whenToPreferThis":"Choose this endpoint when you need fast, structured Bayesian diagnostic test statistics — PPV, NPV, likelihood ratios, and confusion matrix — given known prevalence, sensitivity, and specificity. It is ideal for medical informatics, epidemiology agents, clinical decision support, or any workflow evaluating the real-world accuracy of a binary diagnostic test. Prefer it over generic statistics libraries when you need a single API call with plain-language output included.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:40.840Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-data-desk-bayesian-diagnostic-test-calculator-8d8c9a27"}