# Likelihood Ratio Calculator AI Agent Connect

> Likelihood Ratio Calculator MCP gives your AI agent the math needed to evaluate clinical tests. It handles everything from raw 2x2 contingency tables to sensitivity and specificity rates. You can verify data consistency and check the clinical utility of test results directly within your AI client.

## Overview
- **Category:** statistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_4HIn9OiOnIGGdcYRSWKnW8z7gTPEd92LsNXfKRCJ/ai-agent-connect
- **Tags:** likelihood-ratio, sensitivity, specificity, diagnostics, biostatistics

## Description

This MCP handles the heavy lifting for clinical biostatistics. Instead of manually calculating how a test result shifts the probability of a disease, you can hand the raw data to your AI agent. It works with sensitivity and specificity rates or direct counts from a contingency table. 

If you have a 2x2 table, the MCP can derive the ratios for you. If you only have the rates, it does the same. It also includes built-in checks to make sure your raw counts actually match the rates you're providing, which prevents errors in your diagnostic modeling. Beyond just the math, it helps you interpret whether a specific test has enough diagnostic value to be useful in a real clinical setting. It is built for anyone who needs to move quickly from raw diagnostic data to actionable likelihood ratios without leaving their chat interface.

## Tools

### calculate_from_counts
This tool computes likelihood ratios using raw numbers from a 2x2 contingency table.

### calculate_from_rates
This tool derives positive and negative likelihood ratios when you only have sensitivity and specificity values.

### validate_test_parameters
This tool evaluates the clinical utility of your results to see if the test is actually useful for diagnosis.

### verify_table_consistency
This tool checks that your provided rates align correctly with your raw contingency table counts.

## Prompt Examples

**Prompt:** 
```
Calculate the likelihood ratios for a test with 0.95 sensitivity and 0.90 specificity.
```

**Response:** 
```
The positive likelihood ratio (LR+) is 9.5 and the negative likelihood ratio (LR-) is 0.053.
```

**Prompt:** 
```
Given a contingency table with 80 TP, 10 FP, 5 FN, and 90 TN, what are the likelihood ratios?
```

**Response:** 
```
The positive likelihood ratio (LR+) is 8.0 and the negative likelihood ratio (LR-) is 0.053.
```

**Prompt:** 
```
Is a test with an LR+ of 15 and an LR- of 0.05 useful?
```

**Response:** 
```
Yes, this test has high diagnostic value for both ruling in and ruling out the condition.
```

## Capabilities

### Ratio Calculation
The AI uses this to turn sensitivity and specificity into LR+ and LR- values.

### Contingency Table Processing
The AI uses this to process raw true positive, false positive, false negative, and true negative counts.

### Data Validation
The AI uses this to ensure that provided rates and counts are mathematically consistent.

### Clinical Utility Assessment
The AI uses this to determine if a test result is strong enough to change a diagnosis.

## Use Cases

### Research Validation
Verify that the sensitivity and specificity reported in a study produce the expected likelihood ratios.

### Diagnostic Evaluation
Determine if a specific test is strong enough to rule in or rule out a condition based on its LR values.

### Data Cleaning
Check a 2x2 contingency table against reported rates to find discrepancies in a dataset.

### Clinical Decision Support
Quickly calculate how a positive test result changes the probability of a disease.

## Benefits

- Eliminates manual calculation errors in diagnostic math.
- Validates that raw counts and rates are consistent.
- Provides immediate interpretation of test utility.
- Works directly within your existing AI client interface.

## How It Works

You connect the MCP to your AI client and then provide the diagnostic data.

1. Connect the MCP to Claude, Cursor, or your preferred client via Vinkius.
2. Provide the sensitivity, specificity, or raw contingency table counts to your AI agent.
3. The agent calls the appropriate tool to perform the math or validation.
4. The agent returns the calculated ratios or utility assessment to you.

## Frequently Asked Questions

**Can I use this with my own data?**
Yes. You can provide your own sensitivity, specificity, or raw contingency table counts directly to your AI client.

**What kind of data does the calculator accept?**
It accepts both percentage-based rates like sensitivity and specificity, as well as raw counts from 2x2 contingency tables.

**How do I know if my test is clinically useful?**
The MCP includes a validation tool that interprets the likelihood ratios to determine their diagnostic value.

**Does it check for errors in my tables?**
Yes. The verify_table_consistency tool checks that your provided rates match your raw counts.

**Which AI clients can use this MCP?**
Any MCP-compatible client like Claude, Cursor, or Windsurf can use this tool once connected via Vinkius.

**How do I calculate ratios using sensitivity and specificity?**
You can use the `calculate_from_rates` tool by providing the sensitivity and specificity as decimal values.

**Can I use raw patient counts instead of rates?**
Yes, use the `calculate_from_counts` tool to input True Positives, False Positives, False Negatives, and True Negatives.

**How can I tell if a test result is clinically useful?**
The `validate_test_parameters` tool evaluates the magnitude of your likelihood ratios to categorize their diagnostic strength.
