المختبر
حاسبة اختبار A/B
قدّر حجم الاختبار من زياراتك، ثم اقرأ حكماً يقول متى تكون البيانات أضعف من أن تُحسم.
أدخل زياراتك والنتيجة التي رأيتها، واقرأ إن كانت البيانات كافية للحسم.
الأداة
Plan a test, then read it
The example tests an approval reminder email: does nudging the approver lift the share of trip requests that end in a completed booking from 18%? Plan the sample first, then check the result against it.
Per group
7,426
In total
14,852
Duration
3.7 wk
With 4,000 visitors a week you need about 4 weeks to detect a 10% lift, from 18.0% to 19.8%.
كيف تُحسب
n = (z1−α/2√(2p̄(1−p̄)) + z1−β√(p₁(1−p₁) + p₂(1−p₂)))² ÷ (p₂ − p₁)²
- The formula
- A two-sided, two-proportion z-test: the sum most calculators use. It lands on 3,841 per group for a 10% baseline and a 20% relative lift at 95% and 80% power.
- Minimum detectable effect
- Not the lift you hope for: the smallest one that would change your decision. Halve it and you need roughly four times the visitors.
- Confidence and power
- Confidence guards against false wins (1 in 20 at 95%). Power is the chance of catching a real effect of your chosen size (4 in 5 at 80%).
- More than one variant
- Each variant is compared with control, so the false-win budget is split across the comparisons (Bonferroni). Three groups test at 97.5% each.
- Control rate
- 18.00%
- Variant rate
- 20.71%
- Absolute lift
- +2.71 pts
- Relative lift
- +15.1%
- p-value
- 0.002
- 95% interval, difference
- +1.03 to +4.40 pts
Significant
The variant converts better, and a gap this size would be unlikely if there were no real difference.
كيف تُحسب
z = (pB − pA) ÷ √(p(1−p)(1/nA + 1/nB))
- p-value
- Not the chance the variant is better. It is how surprising your data would be if there were no difference at all.
- Interval for the difference
- The range of lifts consistent with the data. If it runs from barely above zero to large, plan on the low end.
- Underpowered
- The groups are smaller than a lift of the size you saw needs for 80% power. A win on thin data tends to shrink when you roll it out; a loss on thin data proves nothing.
- Stopping early
- Checking daily and stopping at the first p below 0.05 inflates false wins. Decide the sample in the planner first and read the result once.
متى أستخدمه
قبل أن يبدأ أي اختبار، أقدّر حجمه. في سفر الشركات الزيارات متواضعة: بضعة آلاف من طلبات الرحلات في الأسبوع، لا ملايين الجلسات. هذا يغير كل شيء. اختبار ينتهي في يوم على موقع استهلاكي قد يأخذ شهرين هنا، وأفضل أن أعرف ذلك قبل أن أعد بنتيجة في مراجعة دورة.
المخطط يجيب عن ثلاثة أسئلة: كم زائراً تحتاج كل مجموعة، وكم يأخذ ذلك بزياراتنا، وما أصغر رفع أستطيع رؤيته واقعياً في شهر.
الفخاخ
- اختيار الأثر الذي تتمناه. أقل أثر يمكن كشفه ينبغي أن يكون أصغر رفع يغير القرار، لا الذي في عرض الفكرة. نصّفه فيتضاعف العينة نحو أربع مرات.
- إضافة نسخ بلا ثمن. كل نسخة إضافية فرصة أخرى لفوز كاذب، فعلى كل مقارنة أن تتجاوز عتبة أعلى. ثلاث مجموعات تحتاج أكثر من مرة ونصف زوار مجموعتين.
- التلصص. فحص الأرقام كل صباح والتوقف عند أول p تحت 0.05 يحوّل معدل فوز كاذب 5% إلى شيء أسوأ بكثير. أخطط للعينة، وأشغّل أسابيع كاملة، وأقرأها مرة واحدة.
كيف أقرأ نتيجة
للحكم ثلاث حالات عمداً. دال مع بيانات كافية يعني أنني أستطيع التصرف، وأخطط على الطرف الأدنى من الفترة لا على الرفع الرئيسي. غير دال مع بيانات كافية يعني أن الأثر، إن وُجد، غالباً أصغر من أن يهم.
الحالة الثالثة هي التي يتخطاها الناس: قوة غير كافية. المجموعات أصغر مما يحتاجه أثر بالحجم المشاهَد، فالفوز يميل إلى الانكماش حين يُطلق، والخسارة لا تثبت شيئاً. قول "لا نعرف بعد" جواب أفضل من جواب واثق يتبين خطؤه.
مخطط التداخل
مخطط النقطة والشارب يُظهر كل معدل مع فترته. حين لا تتلامس الأشرطة فالفرق دال بوضوح. حين تتداخل قليلاً قد يبقى دالاً، وهذا يفاجئ معظم الناس: الاختبار على الفرق أضيق مما توحي به الأشرطة المنفصلة. لذلك تجلس قيمة p وفترة الفرق بجانب المخطط لا بدلاً منه.