agentleFS
ChrisGVEChrisGVE/localdata-mcp/skills/statistical/sampling-estimation/SKILL.md

sampling-estimation

Skill4 starsChanged 15 months agoApache-2.0View on GitHub

Design sampling strategies and compute estimates with confidence intervals using bootstrap, Bayesian, or classical methods. Use when estimating population parameters from sample data.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Profile the data: Call describe_database and get_data_quality_report with the database name from $ARGUMENTS.

    line 16
  2. Very specific:

    Assess sample representativeness: Call execute_query to examine the distribution of key demographic or stratification variables.

    line 18
  3. Very specific:

    Compute point estimates: Call execute_query to calculate the sample statistic of interest (mean, proportion, median, etc.) along with …

    line 20
  4. Distinctive:

    Compute required sample size: If the user needs to plan future data collection, calculate the sample size needed for a target margin of …

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sampling and Estimation

Design a sampling strategy and compute estimates with proper uncertainty quantification.

Steps

  1. Understand the estimation goal. Identify what parameter needs to be estimated (mean, proportion, difference, ratio) and the target population from the user's question.
  2. Profile the data. Call describe_database and get_data_quality_report with the database name from $ARGUMENTS. Assess available sample size, data completeness, and any stratification variables present in the data.
  3. Assess sample representativeness. Call execute_query to examine the distribution of key demographic or stratification variables. Determine whether the sample is a plausible representation of the target population. Flag potential selection biases.
  4. Compute point estimates. Call execute_query to calculate the sample statistic of interest (mean, proportion, median, etc.) along with summary statistics (n, SD, IQR) needed for confidence interval construction.
  5. Construct confidence intervals. Based on the data characteristics:
    • Large sample, normal: use classical parametric intervals
    • Small sample or skewed: describe bootstrap approach (resample with replacement, compute statistic on each resample, use percentile method for CI)
    • Proportion near 0 or 1: use Wilson or Clopper-Pearson interval rather than Wald
  6. Compute required sample size. If the user needs to plan future data collection, calculate the sample size needed for a target margin of error. Report assumptions about expected variability and confidence level.
  7. Report estimates. Present:
    • Point estimate with units
    • Confidence interval (95% default, note level)
    • Margin of error
    • Sample size and effective sample size (accounting for missing data)
    • Method used for interval construction
  8. Discuss limitations. Address sampling bias, non-response, measurement error, and any extrapolation concerns. Distinguish between the precision of the estimate (narrow CI) and its accuracy (freedom from bias).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.