统计推断结果的可视化(卡方分布,t分布,F分布)

统计推断结果的可视化

一.卡方检验的可视化

卡方检验是利用卡方分布来检验总体的某种假设,主要用于类别变量的推断,比图,一个类别变量的拟合优度,两个类别变量的独立性检验等。
下面检验并可视化以下假设:
①不同满意度的人数分布是否有显著差异。
②网购次数与满意度是否独立。

  1. 检验不同满意度的人数分布是否有显著差异,也就是检验再满意、不满意、中立的3个类别中,观察人数与期望人数是否一致,即检验如下假设:
    H0:观察频数与期望频数差异不显著;H1:观察频数与期望频数差异显著
    使用stats包中的chiq.test函数可以实现该检验;使用gginference包中的ggchiqtest函数可以绘制该检验结果的图形,如下图所示。
library(readxl)
data1_1 <- read_excel("C:/Users/26601/Desktop/数据可视化分析/data1_1.xlsx")
library(gginference)
chisq_test=chisq.test(table(data1_1$满意度))
chisq_test   #显示卡方检验结果
ggchisqtest(chisq_test,colreject = 'red2',colstat = 'blue2') #绘制卡方检验图

在这里插入图片描述
上图是该检验卡方统计量的概率分布,红色阴影面积为显著性水平0.05,其对应的自由度为2时的卡方分布临界值为5.991;蓝色竖线是该检验得到的统计量的位置,统计量的值为59.2.由于检验统计量远大于临界值,拒绝原假设,表示不同满意度之间的人数分布有显著差异。
2.检验网购次数与满意度是否独立,就是检验以下假设
H0:网购次数与满意度独立 ;H1:网购次数与满意度不独立

library(gginference)
tab=table(data1_1$网购次数,data1_1$满意度)
chisq_test=chisq.test(tab)
chisq_test   #显示卡方检验结果
ggchisqtest(chisq_test,colreject = 'red2',colstat = 'blue2') #绘制卡方检验图

在这里插入图片描述
上图显示了该检验卡方分布的临界值(9.488)和检验统计量的值(5.886).结果显示不拒绝原假设,表示网购次数与满意度独立,即二者之间没有相关性。

二.t检验的可视化

t检验在经典统计推断中有着广泛应用,比如,

A free, fully-featured, and extensible tool for automating any web or desktop application. Automation software that drives user interface like a human. How does it work? With UiPath you can create windows automation software that manipulates applications, akin to how a human uses the computer. You can create an automation robot as easy as you train a human user, by simply indicating on the screen what the steps of the automation are and assembling them into a visual flowchart diagram. Anyone can understand a flowchart, and automation is just as intuitive. A free, fully-featured, and extensible tool for automating any web or desktop application. UiPath Studio Community is free for individual developers, small professional teams, education and training purposes UiPath enables organizations to configure software robots that automate manual, repetitive rules-based tasks at a fraction of the cost of their human equivalent, and integrate without disruption the legacy system. Desktop Automation. UiPath Studio introduces a visual, declarative way of describing how to automate a process, and you can use it in the same way you use a Visio diagram. When working with the presentation layer of other apps, you simply indicate on the screen what operation you need to perform. UiPath understands the UI at the logical control level and does not rely on the position of elements on screen. This makes automation much more reliable and independent of screen-size and resolution. Most advanced Screen Scraping Technology. UiPath features an innovative technique for extracting text from running apps, even if they are hidden or covered by another app. Web scraping is a premier feature of the screen-scraping landscape, as there are dedicated methods for extracting pattern-based data that span multiple web pages. Macro Recorder - The world's most advanced windows macro recorder. You create a Windows macro with the UiPath recorder in the same way that you would train a human user to use an application. Indicate directly on the screen where to click, type, select, copy, paste, or perform any other common action and UiPath will generate a visual script like in the image below. UiPath's macro recorder allows you to record mouse events and keyboard activities to generate automation scripts. The arrangement of the activities is on the sequence of actions being performed in the screen. This sequence is saved in your workflow and you can use later playback the recorded actions.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值