شعار Statistical Analyst

Statistical Analyst

المجتمع
borghei
statistical-analyst

Applied statistics for business and product questions — test selection, assumption checks, power planning, effect sizes with intervals, multiplicity correction. Use when interpreting an experiment, sizing a study, or vetting a claim.

نظرة عامة

الناشرborghei
المستودعClaude-Skills
اسم المهارةstatistical-analyst
النجوم
856
التفريعات
154
الملفات المرفقة
12
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 12

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها borghei على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Statistical Analyst في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/borghei/Claude-Skills/tree/main/data-analytics/statistical-analyst
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/borghei/Claude-Skills.git /tmp/Claude-Skills
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills/data-analytics/statistical-analyst .claude/skills/statistical-analyst
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Statistical Analyst في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Statistical Analyst تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Statistical Analyst بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Statistical Analyst

Most bad statistics in business are not arithmetic errors. They are the wrong test on the right data, a null result reported as "no difference," a p-value mistaken for an effect size, or twenty comparisons run and the one that cleared 0.05 written up. This skill covers the applied path: pick the test the data shape actually calls for, check the assumptions that carry weight, size the study before running it, report effects with intervals rather than bare p-values, and say what you found to people who do not want a statistics lecture.

Everything here runs on the Python standard library — the t, chi-square, and normal distributions are implemented directly, so there is no scipy dependency between a question and an answer. Because those implementations are hand-rolled, stats_core.py --selftest verifies all of them against published reference values; run it once before trusting any result.

When to use this skill

  • An A/B test finished and someone needs to know whether to ship
  • A study is being designed and nobody has computed how many observations it needs
  • A stakeholder is quoting a p-value as if it were an effect size
  • A "no difference" result is about to be reported from a study that was underpowered
  • Several variants, metrics, or segments were compared and no correction was applied
  • The data are skewed or outlier-heavy and the default t test is about to be run anyway

Inputs the skill expects

  • The business question and what decision it will change
  • The outcome variable and its type (binary, continuous, count, ordinal, categorical)
  • Group structure — how many groups, independent or paired, randomized or observational
  • Observation counts per group, and the unit of measurement (user, session, order)
  • The baseline value and the smallest effect worth acting on
  • How many comparisons are in the family, and which metric was named primary before the data arrived

Clarify First

Before analyzing, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • The unit of measurement, and whether each unit appears once — clustering (many sessions per user counted as independent rows) deflates standard errors and manufactures significance; it invalidates every test below
  • The smallest effect worth acting on — without it there is no way to size the study or to say whether a significant result matters
  • How many comparisons are in the family, and which metric was primary — decides the correction and whether the result is confirmatory or exploratory
  • Whether anyone has already looked at the data while it accumulated — peeking invalidates a fixed-horizon test and changes the whole approach

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Workflows

Workflow 1 — Choose the test and size the study before collecting data

  1. Write down the business question and the decision it changes. If the answer changes nothing, stop — do not run the study.
  2. Fill in the outcome type, group structure, baseline, and the minimum effect worth shipping into a question spec.
  3. Run the selector. It returns one test, its load-bearing assumptions, the fallback when they fail, and the sample size the stated effect requires.
  4. If the achievable sample is below the required sample, say so before running. An underpowered study should be a conscious decision, not a discovery at write-up time.
  5. Record everything in assets/experiment_design_template.md.
bash
python3 data-analytics/statistical-analyst/scripts/test_selector.py \
  --input data-analytics/statistical-analyst/assets/sample_question.json \
  --power 0.9

Workflow 2 — Run the test and report the effect, not the p-value

  1. Check independence first: count units versus count rows. More rows than units means clustering, and no test below is valid until that is handled.
  2. Inspect skew and outliers (mean vs median, top and bottom five values). If the data are heavy-tailed at small n, switch to Mann-Whitney.
  3. Run the test with the number of comparisons in the family declared, so the threshold is corrected.
  4. Read the effect size and the interval first. Report the effect in domain units, the interval in the same units, and the decision implication.
bash
python3 data-analytics/statistical-analyst/scripts/stats_core.py --selftest

python3 data-analytics/statistical-analyst/scripts/run_test.py \
  --input data-analytics/statistical-analyst/assets/sample_experiment.json \
  --comparisons 3

Workflow 3 — Audit someone else's statistical claim

  1. Ask what the unit of measurement was and whether units repeat. This finds more real errors than every distributional check combined.
  2. Ask how many comparisons were run in total, including the ones not reported, and whether the primary metric was named before the data arrived.
  3. Re-run the test from the raw counts, with the true comparison count.
  4. If the claim is a null result, compute the interval and state the largest effect the study could have missed — "no difference" and "we could not tell" look identical in a significance test and are opposite conclusions.
bash
python3 data-analytics/statistical-analyst/scripts/run_test.py \
  --input data-analytics/statistical-analyst/assets/sample_revenue.json \
  --test welch_t --comparisons 4 --format json

Decision frameworks

Test selection

QuestionOutcomeGroupsTestEffect size
DifferenceBinary2 independent[PROVEN] Two-proportion zAbsolute difference; Cohen's h
DifferenceBinary2 paired[PROVEN] McNemarOdds ratio on discordant pairs
DifferenceBinary/categorical3+[PROVEN] Chi-square of independenceCramér's V
DifferenceContinuous, symmetric2 independent[PROVEN] Welch's tMean difference; Hedges' g
DifferenceContinuous, skewed or n<152 independent[PROVEN] Mann-Whitney URank-biserial r
DifferenceContinuous3+[RECOMMENDED] One-way ANOVAEta-squared
DifferenceCount per exposure2[RECOMMENDED] Poisson rate ratioRate ratio
AssociationTwo continuous—[PROVEN] Pearson, or Spearman if skewedr, r²
Change over timeAny—[RECOMMENDED] Interrupted time seriesLevel and slope change

Use Welch's t, never Student's t, as the two-group default. It does not assume equal variances and costs a fraction of a degree of freedom when they are equal. Testing for equal variance first and then choosing is worse than always using Welch — the pre-test inflates the error rate of the whole procedure.

Reading an interval against your decision threshold

Interval positionReadingAction
Entirely above the thresholdReal and big enoughShip
Above zero, straddles the thresholdReal, unclear if it clears the barCollect more, or decide on cost
Straddles zero, narrowGenuinely no meaningful effectDo not ship — and this is the only case where "no difference" is honest
Straddles zero, wideStudy could not answer the questionReport as inconclusive, state the upper bound

The last two are identical in a significance test and are opposite conclusions. That is the strongest single argument for reporting intervals.

Sample size reality check

Per group, α = 0.05, power = 0.80:

Baseline rateRelative effect to detectn per group
2%+10%~78,000
8%+10%~28,500
8%+25%~4,900
20%+10%~9,000
20%+25%~1,600

Most product experiments are sized by "how long can we wait," which is how underpowered studies get written up as "no difference."

Anti-Patterns

P-hacking by exploration

Mistake: Twenty metrics, six segments, and three time windows get compared; the one combination that clears p < 0.05 becomes the headline. Why it happens: It rarely feels like cheating. Each individual comparison is a reasonable question, the analyst is genuinely curious, and the tooling makes slicing free. Nobody counts the comparisons because nobody wrote them down. Instead: Name one primary metric before the data arrive and pre-register the subgroups you will examine. Everything else is exploratory, gets Benjamini-Hochberg correction, and is reported as hypothesis-generating rather than decisive. With α = 0.05 and 20 uncorrected comparisons, the chance of at least one false positive is 64% — a coin flip dressed as a finding.

Peeking at a running experiment

Mistake: The dashboard is checked daily and the test is stopped the moment p dips below 0.05. Why it happens: The data are right there, stopping early saves time and traffic, and each individual look feels harmless. The intuition that "more data can only help" is exactly backwards here. Instead: Fix the horizon, compute n up front, and do not look — or use a method built for continuous monitoring (group sequential with O'Brien-Fleming spending, or always-valid confidence sequences). Repeated peeking at an uncorrected fixed-horizon test drives the real false-positive rate to 20-30%: a random walk crosses the threshold eventually even when nothing is happening. If it has already happened, report the result as exploratory and re-run with a fixed horizon.

Reading a null result as "no effect"

Mistake: p = 0.31, so the memo says the change made no difference and the feature is killed. Why it happens: "Not significant" sounds like "no effect," and the alternative sentence — "we ran a study that could not answer the question" — is uncomfortable to write. Instead: Report the interval. If it runs from −0.2% to +4.1%, the study is consistent with a substantial gain and has ruled out almost nothing. State the largest effect you could have missed. Only a narrow interval around zero supports "no meaningful effect," and that distinction is invisible in the p-value.

Confusing significance with importance

Mistake: At n = 400,000 a 0.02% conversion difference reaches p < 0.001 and gets a roadmap slot. Why it happens: p-values conflate effect size with sample size, so at large n everything is significant. The number looks impressive precisely because the sample is large. Instead: Set the decision threshold from the economics — cost to ship divided by value per unit — before the analysis. Then compare the interval to that threshold, not to zero. The reciprocal error matters equally: at small n, an important effect can miss significance and get discarded.

Ignoring the unit of measurement

Mistake: A test on 50,000 sessions from 4,000 users treats every session as an independent observation. Why it happens: The event table has 50,000 rows, the tooling counts rows, and the resulting p-value is gratifyingly small. It is invisible unless someone explicitly compares row count to unit count. Instead: Aggregate to the unit of assignment before testing, or use a cluster-robust method. Treating clustered rows as independent can understate the standard error several-fold and turn pure noise into a highly significant result. This is the single most common invalidating error in applied product analytics, and the cheapest to check.

Files

FilePurpose
scripts/test_selector.pyRecommends one test from question type, outcome type, group structure, and distribution; returns assumptions, fallback, required sample size for a stated MDE, and design warnings
scripts/run_test.pyRuns two-proportion z, Welch's t, chi-square, and Mann-Whitney with effect sizes, confidence intervals, Bonferroni-adjusted thresholds, and assumption warnings
scripts/test_impl.pyThe four test implementations behind run_test.py, with their effect-size magnitude readings; --selftest verifies each against a worked example
scripts/stats_core.pyNormal, Student's t, and chi-square distributions plus the Wilson interval, in stdlib math only; --selftest verifies all 18 against published reference values
references/test-selection-and-assumptions.mdSelection tree, which assumptions are load-bearing and how each fails, power formulas and sizing tables, multiple-comparison corrections, sequential testing
references/effect-sizes-and-communication.mdEffect sizes per test with thresholds, interval choice and interpretation, language for non-statisticians, practical-vs-statistical significance, reporting checklist
assets/sample_question.jsonQuestion spec for the selector — an underpowered 3-variant conversion test
assets/sample_experiment.jsonTwo-proportion conversion data
assets/sample_revenue.jsonContinuous order-value data for Welch's t
assets/sample_contingency.json3x4 contingency table for chi-square
assets/sample_session_times.jsonRight-skewed time-on-task data for Mann-Whitney
assets/experiment_design_template.mdPre-registration template: question, primary metric, decision threshold, sizing, stopping rule, deviations log

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Statistical Analyst؟

Applied statistics for business and product questions — test selection, assumption checks, power planning, effect sizes with intervals, multiplicity correction. Use when interpreting an experiment, sizing a study, or vetting a claim.

لماذا تستخدم Statistical Analyst على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Statistical Analyst عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Statistical Analyst في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/borghei/Claude-Skills/tree/main/data-analytics/statistical-analyst. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Statistical Analyst؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Statistical Analyst؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Statistical Analyst معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Statistical Analyst مجانية؟

نشرها borghei على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇