# Pre-test/Post-test Probability Calculator AI Agent Connect

> Pre-test/Post-test Probability Calculator MCP is a Bayesian mathematical engine designed for clinical reasoning. It lets your AI client convert initial suspicions into updated post-test probabilities using likelihood ratios. You can switch between odds and probabilities or run sensitivity analyses to see how different likelihood ratios change your results.

## Overview
- **Category:** statistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_6fPeFmpl6TqBewkgwT7Bgm4tQbT3aMYR8InlTyDf/ai-agent-connect
- **Tags:** bayesian, probability, clinical, likelihood-ratio, statistics

## Description

This MCP gives your AI client the math it needs to handle Bayesian clinical reasoning. Instead of guessing, you can provide a pre-test probability and use likelihood ratios to find the actual post-test probability. It handles the heavy lifting of converting between odds and probabilities so you don't have to. You can also run sensitivity analyses to see how much a specific test result actually moves the needle. It is built for anyone who needs to move from a hunch to a calculated probability using standard clinical statistics.

## Tools

### calculate_post_test_probability
This tool performs the core Bayesian update to find the final probability after a test is applied.

### convert_odds_to_probability
Use this to turn updated odds back into a standard probability format.

### convert_probability_to_odds
This tool translates a standard probability into a ratio format known as odds.

### perform_sensitivity_analysis
This tool explores how different likelihood ratios impact the final post-test probability.

## Prompt Examples

**Prompt:** 
```
Calculate the post-test probability if the pre-test probability is 0.2 and the positive likelihood ratio is 10.
```

**Response:** 
```
The pre-test odds are 0.25. After applying a likelihood ratio of 10, the post-test odds are 2.5, resulting in a post-test probability of 0.714.
```

**Prompt:** 
```
Convert a probability of 0.5 to odds.
```

**Response:** 
```
The odds for a probability of 0.5 are 1.0.
```

**Prompt:** 
```
Perform sensitivity analysis for a pre-test probability of 0.1 with LR range [2, 5, 10].
```

**Response:** 
```
For a pre-test probability of 0.1: with LR 2, the probability is 0.167; with LR 5, the probability is 0.333; with LR 10, the probability is 0.5.
```

## Capabilities

### Bayesian Updates
Your agent uses this to calculate new probabilities after a test result.

### Odds Conversion
The AI switches between probability and odds formats instantly.

### Sensitivity Testing
Your agent tests how different likelihood ratios change the outcome.

### Clinical Reasoning Support
The tool provides the mathematical backbone for diagnostic probability updates.

## Use Cases

### Diagnostic Updates
Update the probability of a disease after a patient receives a positive test result.

### Test Evaluation
Use sensitivity analysis to see how much a specific test improves diagnostic certainty.

### Statistical Modeling
Convert probability data into odds for use in other statistical models.

### Clinical Decision Support
Help an AI agent provide more accurate probability estimates during medical reasoning.

## Benefits

- Removes manual Bayesian math errors by automating the update process.
- Provides instant conversion between odds and probabilities.
- Allows for quick testing of different likelihood ratio scenarios.

## How It Works

Connect the MCP to your client and start running calculations immediately.

1. Connect your client to Vinkius.
2. Select the Pre-test/Post-test Probability Calculator MCP.
3. Ask your AI client to perform a calculation or conversion.
4. The agent uses the specific tool to return the mathematical result.

## Frequently Asked Questions

**What does this MCP do?**
It acts as a mathematical engine for Bayesian clinical reasoning, allowing you to update probabilities using likelihood ratios.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**How do I perform a sensitivity analysis?**
You can ask your AI agent to use the perform_sensitivity_analysis tool with a specific range of likelihood ratios.

**Does this handle odds and probabilities?**
Yes, it includes specific tools to convert between probability and odds.

**Do I need to host this myself?**
No, Vinkius hosts and manages the MCP so it is ready to use immediately after connection.

**What is the purpose of this tool?**
It performs Bayesian updates to calculate how a test result changes the probability of a condition using `calculate_post_test_probability`.

**Can I test multiple likelihood ratios at once?**
Yes, you can use `perform_sensitivity_analysis` to see how a range of different likelihood ratios affects the final probability.

**How do I convert odds back to probability?**
You can use the `convert_odds_to_probability` tool to translate any odds value back into a standard probability.
