# Sampling Plan Designer AI Agent Connect

> Generates statistically rigorous sampling plans for quality control.

## Overview
- **Category:** statistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_FXsfft823H396NPVt12UywvRPYlb2beY37hY8K3s/ai-agent-connect
- **Tags:** sampling, iso-2859, ansi-asq, quality-assurance, statistical-analysis

## Description

This MCP server provides tools to design and evaluate statistical sampling plans for analytical quality control. It allows users to calculate fundamental parameters like sample size and acceptance numbers, retrieve standardized plans from ISO 2859 or ANSI/ASQ, generate Operating Characteristic (OC) curves, and compare different plans to determine which is more conservative for a given defect rate. Use `calculate_basic_plan` to find optimal parameters, `lookup_standard_plan` for industry standards, and `get_oc_curve_data` for visualization data.

## Tools

### calculate_basic_plan
Generates the fundamental parameters of a sampling plan (n and c) based on target quality and risk levels

### compare_plans
Evaluates two different sampling plans to determine which is more stringent or carries less risk

### get_oc_curve_data
Provides a series of data points to plot the Operating Characteristic curve for a specific plan

### lookup_standard_plan
Retrieves a pre-defined sampling plan from ISO 2859 or ANSI/ASQ tables based on lot size and inspection level

## Prompt Examples

**Prompt:** 
```
Calculate a sampling plan for a lot of 5000 units with an AQL of 0.01, producer risk of 0.05, and consumer risk of 0.10.
```

**Response:** 
```
For a lot size of 5000 with an AQL of 1%, the calculated sample size is 132 and the acceptance number is 3.
```

**Prompt:** 
```
What is the standard plan for a lot size of 1000 using ISO 2859 General II inspection?
```

**Response:** 
```
The ISO 2859 General II plan for a lot size of 1000 specifies a sample size of 80 and an acceptance number of 2.
```

**Prompt:** 
```
Compare a plan with sample size 50 and acceptance number 1 against a plan with sample size 80 and acceptance number 2 at a 2% defect rate.
```

**Response:** 
```
At a 2% defect rate, the plan with sample size 80 and acceptance number 2 is more conservative.
```

## Frequently Asked Questions

**How do I generate a plan based on specific risk levels?**
You can use the `calculate_basic_plan` tool by providing the lot size, target AQL, producer risk, and consumer risk.

**Can I use industry standards like ISO 2859?**
Yes, the `lookup_standard_plan` tool allows you to retrieve plans directly from ISO 2859 and ANSI/ASQ tables.

**How can I compare two different sampling plans?**
Use the `compare_plans` tool to evaluate two plans against a specific defect rate to see which is more stringent.
