ABtest描述统计功效

AB实验样本量确定 文章目录1. 统计功效与关键概念2. Z检验样本量确定2.1 统计功效公式推导2.2 样本量计算公式2.3 求解样本量3. 卡方检验样本量确定3.1 求解样本量4. 简要总结Reference 在数据分析过程中,一个完整的闭环是从数据中得到洞察,根据洞察得到某种假设,通过实验检验这一假设。 AB实验实际上是在做一个假设检验,可以参考上一篇笔记【概率论】- (2)假设检验,在查资料的过程中,主要有两... 阅读详情

我们在面试数据分析时,常常会问到如何确定样本量的问题,会有一个指标:统计功效(power),或者是1-β

统计功效会影响实验的可信度,甚至会影响实验所需的样本量,要了解统计功效,首先要理解两类统计错误

假如我们做了一个AB实验,且两组用户的数据均值为μ1和μ2,我们会有两个初始假设:

H0:两个实验组的数据没有差别(μ1=μ2),这个假设也叫“零假设”,也叫原假设

H1:两个实验组之间的数据存在差别(μ1≠μ2),这个假设也叫“非零假设”,也叫备择假设

定义两类错误:

实验本身没有效应,但我们觉得有效应。这是一类错误,或者叫α错误

实验本身有效应,但是我们误以为没有。这是二类错误,或者叫β错误

统计量临界值:

 在H0假设下,统计量有一个分布,如上图H0,当计算的统计量处于分布的小概率区域时,我们就可以说零假设是小概率事件,可以拒绝零假设。如图,当统计量大于2时,我们就可以拒绝H0,此时,我们犯第一类错误的概率就是α,换句话说,零假设是真的,我们却拒绝了它。

当我们设定了显著性水平时,α就确定了,一般为0.05,对应的统计量水平也就确定了,如图为2。

第二类错误就是,即使没有达到拒绝H0的标准(统计量小于2),但是其实H1是真的,我们却拒绝了它,这个错误的概率定义为β。所谓β,就是犯二类错误的概率。

而统计功效,就是1-β,即不犯二类错误的概率。换句话说,就是当AB两组差异真的存在时,我们能正确判断的概率。

统计功效的现实意义

当统计功效低,那么当AB两组差异真的存在时,我们很可能会错误判断两组差异不存在

AB测试统计功效与描述统计实战指南 AB测试中的统计功效(Statistical Power)是决定实验能否可靠检出真实差异的核心指标,其本质是‘当改动真实有效时,实验成功识别它的概率’。它并非独立参数,而是由基线均值、标准差、最小可检测效应(MDE)和显著性水平α共同决定的推演结果。描述统计(如均值、标准差、置信区间)为功效计算提供输入基础,二者构成‘数据表征→检测能力评估’的因果链。高功效意味着更低的第二类错误风险,支撑更稳健的业务决策;而功效不足将导致微小但真实的优化被系统性忽略,或引发反复验证、置信区间过宽等静默失效。本文聚焦ABte 阅读详情

相关推荐

概率统计实战指南:从AB测试到模型评估,掌握数据决策核心

概率论与统计学是数据科学和机器学习的基石,其核心在于通过数学模型量化不确定性并支持科学推断。从基础的概率思维到贝叶斯推断,这些原理构成了现代数据驱动决策的理论框架。在技术价值上,它们能将模糊的业务问题转化为可检验的假设,为产品迭代、算法优化和系统监控提供科学依据。典型的应用场景包括AB测试、机器学习模型评估和异常检测等。例如,在AB测试中,假设检验和置信区间是评估功能效果的核心工具;在模型评估中,准确率、精确率、召回率等指标都离不开统计学的支撑。本文以极客时间的《概率论与统计学》课程为载体,深入剖析了如何将

weixin_30558697的博客 343

【数据攻略】 假设检验 | 统计功效 | 最小样本量

转载:概率论系列考点 — 统计功效 | 最小样本量 统计功效及最小样本量是假设检验的进阶知识点 也是AB实验中非常常用的两个基本概念 因此,是各大厂面试官考察应聘者对假设检验的真实掌握情况 考点举例: ▶第一类错误的定义? ▶统计功效的定义,以及应用场景? ▶统计功效较低的影响是什么? ▶最小样本量计算公式是什么? ▶计算最小样本量的业务指导意义? 以下文章涉及相关推导,有些同学可能看着吃力些 不要担心 只要了解 假设检验 |统计功效 |最小样本量的定义...

qq_40002713的博客 6654

业务知识-ABtest实验&假设检验

先占一个标题

weixin_43885654的博客 4378

AB测试 - 假设检验的两类错误

假设检验两类错误

Shine_YD的博客 4338

AB实验_如何计算P值、效应量和统计功效

P值、效应量和统计功效

fff2zrx的博客 4514

unity中判断是否联网,判断网络状态的两种方式

unity中判断是否联网,判断网络状态的两种方式

wla2996gpy032的博客 1881

STM32在六轴机械臂实时控制中的选型与分层架构设计

嵌入式实时控制系统中,微控制器的选型直接决定运动控制精度与系统可靠性。其核心在于匹配确定性中断响应、低延迟外设协同与工业协议栈支持等硬性指标。STM32凭借Cortex-M内核的NVIC调度能力、成熟HAL库及CAN FD/高级定时器等专用外设,在机电一体化场景中成为伺服控制中枢的首选。相比ESP32等通用MCU,STM32在硬实时性、EMC认证生态和工业总线兼容性上具备不可替代优势。本文围绕GTB六轴机械臂项目,详解基于STM32F407的硬件抽象层配置、FreeRTOS任务调度、事件队列解耦及闭环控制数

jupi8的博客 759

opencv的cmake报错

1、下载 ippicv_2021.8_win_intel64_20230330_general.zip、v0.1.2a.zip、opencv_videoio_ffmpeg.dll、opencv_videoio_ffmpeg_64.dll、ffmpeg_version.cmake。由于下载源在https://raw.githubusercontent.com,由于网络原因下载不顺畅,可以先找到文件下载到对应文件夹下,或者更改网络环境。ffmpeg_version.cmake文件,打开后显示如下, 另存即可。

nownow_的博客 1303

保姆级教程:用torch.profiler给你的vLLM推理做个“全身体检”(附Perfetto可视化分析)

本文提供了一份详细的vLLM推理性能分析教程,通过torch.profiler和Perfetto工具链实现从数据采集到可视化分析的全流程。文章涵盖了环境配置、性能数据采集、trace文件解析以及Perfetto可视化分析,帮助开发者优化大模型推理服务的性能,显著降低计算资源消耗。

weixin_29041767的博客 360

ctf——writeup

ctf线上赛——第三关地址:http://106.75.86.18:2222提示:ip spoofing——ip伪造首先访问目标地址,一个正常的网页,挺文艺的。上面有些提示。根据上面的提示,我们浏览网页。找了好久,终于找到你。这个跳转链接。(在这个页面下方)我们接着点击这个链接,就跳转到administrator.php这个页面了。看到这个登录页面,就要知道用户名,密码,可是没有怎么办。一开始也试

Child_by_dream的博客 1323

避开这些坑!baostock获取股票数据时最容易犯的5个错误(Python实战)

本文针对使用Python和baostock库获取股票历史数据时常见的五大陷阱,提供了实战解决方案。重点剖析了登录状态验证、参数配置、数据解析、批量操作效率及数据一致性校验等关键环节,帮助开发者构建稳健高效的数据获取流程,避免因细节疏忽导致的数据错误或性能瓶颈。

websocket5live的博客 1455

创意视觉项目实战:用ESP32-S3+OV5640构建智能图像流系统

本文详细介绍了如何使用ESP32-S3开发板与OV5640摄像头模块构建智能图像流系统。从硬件连接到软件配置,涵盖Arduino环境搭建、图像采集优化、WiFi视频流传输及外设集成,为开发者提供完整的实战指南,助力智能家居和机器人视觉项目开发。

tech5的博客 1303

Deepfake检测模型-PyDeepFakeDet项目复现实验报告-深度学习

该实验是对于https://github.com/wangjk666/PyDeepFakeDet模型的复现。PyDeepFakeDet 是一款集成的、可扩展的 Deepfake 检测工具。目标是提供最先进的 Deepfake 检测模型以及用于在常用 Deepfake 数据集上训练和评估新模型的接口。

一位不是很硕的鉴伪方向硕士 5496

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 常见机器学习优点和缺点
下一篇: ABtest描述显著性
数据分析厂长
博客等级 码龄10年 12粉丝 7原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址