# Send Pywayne Statistics to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "statistics-2",
    "name": "Pywayne Statistics",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangyendt/statistics-2",
    "canonicalUrl": "https://clawhub.ai/wangyendt/statistics-2",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/statistics-2",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=statistics-2",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "statistics-2",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T15:58:06.537Z",
      "expiresAt": "2026-05-14T15:58:06.537Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=statistics-2",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=statistics-2",
        "contentDisposition": "attachment; filename=\"statistics-2-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "statistics-2"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/statistics-2"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/statistics-2",
    "downloadUrl": "https://openagent3.xyz/downloads/statistics-2",
    "agentUrl": "https://openagent3.xyz/skills/statistics-2/agent",
    "manifestUrl": "https://openagent3.xyz/skills/statistics-2/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/statistics-2/agent.md"
  }
}
```
## Documentation

### Pywayne Statistics

Comprehensive statistical testing library for hypothesis testing, A/B testing, and data analysis.

### Quick Start

from pywayne.statistics import NormalityTests, LocationTests
import numpy as np

# Test data normality
nt = NormalityTests()
data = np.random.normal(0, 1, 100)
result = nt.shapiro_wilk(data)
print(f"p-value: {result.p_value:.4f}, is_normal: {not result.reject_null}")

# Compare two groups
lt = LocationTests()
group_a = np.random.normal(100, 15, 50)
group_b = np.random.normal(105, 15, 50)
result = lt.two_sample_ttest(group_a, group_b)
print(f"Significant difference: {result.reject_null}")

### NormalityTests (NormalityTests)

Test if data follows a normal distribution or other specified distributions.

MethodDescriptionUse Caseshapiro_wilkShapiro-Wilk testSmall-medium samples (n ≤ 5000)ks_test_normalK-S normality testMedium-large samplesks_test_two_sampleTwo-sample K-S testCompare two sample distributionsanderson_darlingAnderson-Darling testTail-sensitive normality testdagostino_pearsonD'Agostino-Pearson K²Based on skewness and kurtosisjarque_beraJarque-Bera testLarge samples, regression residualschi_square_goodness_of_fitChi-square goodness-of-fitCategorical datalilliefors_testLilliefors testUnknown parameters K-S test

Example:

from pywayne.statistics import NormalityTests

nt = NormalityTests()
result = nt.shapiro_wilk(data)
if result.p_value < 0.05:
    print("Data is NOT normally distributed")
else:
    print("Data follows normal distribution")

### LocationTests (LocationTests)

Compare means or medians across groups (parametric and non-parametric).

MethodDescriptionUse Caseone_sample_ttestOne-sample t-testCompare sample mean to a valuetwo_sample_ttestTwo-sample t-testCompare two independent group meanspaired_ttestPaired t-testCompare before/after measurementsone_way_anovaOne-way ANOVACompare 3+ group meansmann_whitney_uMann-Whitney U testNon-parametric two-sample testwilcoxon_signed_rankWilcoxon signed-rankNon-parametric paired testkruskal_wallisKruskal-Wallis H testNon-parametric multi-group test

Example (A/B Testing):

from pywayne.statistics import LocationTests, NormalityTests

lt = LocationTests()
nt = NormalityTests()

# Check normality first
if nt.shapiro_wilk(control).p_value > 0.05:
    result = lt.two_sample_ttest(control, treatment)
else:
    result = lt.mann_whitney_u(control, treatment)

print(f"Effect significant: {result.reject_null}")

### CorrelationTests (CorrelationTests)

Test correlation between variables and independence of categorical variables.

MethodDescriptionUse Casepearson_correlationPearson correlationLinear relationshipspearman_correlationSpearman's rankMonotonic relationshipkendall_tauKendall's tauRank correlation, small sampleschi_square_independenceChi-square independenceCategorical variablesfisher_exact_testFisher's exact test2×2 contingency tablemcnemar_testMcNemar's testPaired categorical data

Example:

from pywayne.statistics import CorrelationTests

ct = CorrelationTests()
result = ct.pearson_correlation(x, y)
print(f"Correlation: {result.statistic:.3f}, p-value: {result.p_value:.4f}")

### TimeSeriesTests (TimeSeriesTests)

Test time series properties: stationarity, autocorrelation, cointegration.

MethodDescriptionUse Caseadf_testAugmented Dickey-FullerUnit root test for stationaritykpss_testKPSS testStationarity test (complements ADF)ljung_box_testLjung-Box Q testOverall autocorrelationruns_testRuns testRandomness testingarch_testARCH effect testHeteroscedasticitygranger_causalityGranger causalityCausal relationshipengle_granger_cointegrationEngle-Granger cointegrationLong-term equilibriumbreusch_godfrey_testBreusch-GodfreyHigher-order autocorrelation

Example:

from pywayne.statistics import TimeSeriesTests

tst = TimeSeriesTests()
adf_result = tst.adf_test(time_series_data)
kpss_result = tst.kpss_test(time_series_data)

if adf_result.reject_null:
    print("Series is stationary")
else:
    print("Series has unit root (non-stationary)")

### ModelDiagnostics (ModelDiagnostics)

Regression model diagnostics: heteroscedasticity, autocorrelation, multicollinearity.

MethodDescriptionUse Casebreusch_pagan_testBreusch-PaganHeteroscedasticity testwhite_testWhite's testGeneral heteroscedasticitygoldfeld_quandt_testGoldfeld-QuandtStructural break heteroscedasticitydurbin_watson_testDurbin-WatsonFirst-order autocorrelationvariance_inflation_factorVIFMulticollinearity diagnosislevene_testLevene's testHomogeneity of variancebartlett_testBartlett's testHomogeneity (normal assumption)residual_normality_testResidual normalityRegression assumption check

Example:

from pywayne.statistics import ModelDiagnostics

md = ModelDiagnostics()
residuals = y - model.predict(X)

# Check assumptions
bp_result = md.breusch_pagan_test(residuals, X)
dw_result = md.durbin_watson_test(residuals)

if bp_result.reject_null:
    print("Warning: Heteroscedasticity detected")

### TestResult Object

All test methods return a unified TestResult object:

result = nt.shapiro_wilk(data)

# Access results
result.test_name        # Test method name
result.statistic        # Test statistic value
result.p_value          # P-value
result.reject_null      # True if null hypothesis is rejected
result.critical_value   # Critical value (if applicable)
result.confidence_interval # Tuple (lower, upper) if applicable
result.effect_size      # Effect size if applicable
result.additional_info  # Dict with additional information

### list_all_tests()

List all available test methods across all modules.

from pywayne.statistics import list_all_tests
print(list_all_tests())

### show_test_usage(method_name)

Display usage and documentation for a specific test.

from pywayne.statistics import show_test_usage
show_test_usage('shapiro_wilk')

### Normality Tests

Sample SizeRecommended Methodn < 30Shapiro-Wilk30 ≤ n ≤ 300Shapiro-Wilk, D'Agostino-Pearsonn > 300Jarque-Bera, Kolmogorov-Smirnov

### Location Tests

ConditionParametricNon-parametricNormal datat-test, ANOVA-Non-normal data-Mann-Whitney U, Kruskal-WallisPaired dataPaired t-testWilcoxon signed-rank

### Multiple Testing Correction

When performing multiple tests, apply p-value correction:

from statsmodels.stats.multitest import multipletests

p_values = [r.p_value for r in results]
rejected, p_corrected, _, _ = multipletests(
    p_values, alpha=0.05, method='fdr_bh'
)

### Data Quality Check

def data_quality_check(data):
    nt = NormalityTests()
    lt = LocationTests()

    normality = nt.shapiro_wilk(data)

    # Outlier detection (IQR)
    Q1, Q3 = np.percentile(data, [25, 75])
    IQR = Q3 - Q1
    outliers = data[(data < Q1 - 1.5*IQR) | (data > Q3 + 1.5*IQR)]

    return {
        'size': len(data),
        'is_normal': not normality.reject_null,
        'p_value': normality.p_value,
        'outliers': len(outliers)
    }

### A/B Testing Workflow

def ab_test_analysis(control, treatment):
    nt = NormalityTests()
    lt = LocationTests()

    # Check normality
    norm_c = nt.shapiro_wilk(control[:100])
    norm_t = nt.shapiro_wilk(treatment[:100])

    # Choose appropriate test
    if norm_c.p_value > 0.05 and norm_t.p_value > 0.05:
        result = lt.two_sample_ttest(control, treatment)
    else:
        result = lt.mann_whitney_u(control, treatment)

    return {
        'test_used': result.test_name,
        'p_value': result.p_value,
        'significant': result.reject_null,
        'effect_size': result.effect_size
    }

### Regression Model Diagnostics

def diagnose_model(y, X, model):
    md = ModelDiagnostics()
    residuals = y - model.predict(X)

    return {
        'heteroscedasticity_bp': md.breusch_pagan_test(residuals, X).reject_null,
        'autocorrelation_dw': md.durbin_watson_test(residuals).statistic,
        'residuals_normal': md.residual_normality_test(residuals).p_value,
        'vif_max': max(md.variance_inflation_factor(X))
    }

### Notes

All methods accept np.ndarray or list as input
All methods return TestResult with consistent interface
Always validate test assumptions before applying parametric tests
Apply multiple testing correction when performing several tests
Report effect sizes alongside p-values for complete interpretation
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: wangyendt
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T15:58:06.537Z
- Expires at: 2026-05-14T15:58:06.537Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/statistics-2)
- [Send to Agent page](https://openagent3.xyz/skills/statistics-2/agent)
- [JSON manifest](https://openagent3.xyz/skills/statistics-2/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/statistics-2/agent.md)
- [Download page](https://openagent3.xyz/downloads/statistics-2)