Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize T Test and Visualization in R language

Shulou Source: shulou.com Published: 2022-06-02 01:13:01 10月06日 Update

In this article, the editor introduces in detail "R language how to achieve T-test and visualization", the content is detailed, the steps are clear, and the details are handled properly. I hope this "how to achieve T-test and visualization in R language" article can help you solve your doubts. Let's follow the editor's ideas to learn new knowledge.

T-test, also known as student t-test (Student's t test), is mainly used for small sample sizes (e. G. n

< 30),总体标准差σ未知的正态分布。T检验是用t分布理论来推论差异发生的概率,从而比较两个平均数的差异是否显著。在R语言中T检验用的方法为:t.test(),如果数据不符合正态分布,也就是数据当中有较大的离群值时,可选用非参数秩和检验法,如Wilcoxon test,R语言中对应的方法为:wilcox.test()。关于检验方法的选择可参考:差异统计检验如何选择 单样品T检验 例:某鱼塘水的含氧量多年平均值为4.5mg/L,现在该鱼塘设10点采集水样,问该次抽样的水中含氧量与多年平均值是否有显著差异。 #数据s0.05 符合正态分布t.test(s,mu=4.5) #T检验, 如果 P>

0.05 equal unpaired two-sample T-test

Ex.: in order to understand the effect of a certain antihypertensive drug, 28 patients with hypertension were randomly divided into the experimental group and the control group. the experimental group was treated with new antihypertensive drugs and the control group was treated with standard drugs. the difference of diastolic blood pressure before and after treatment is as follows. Is the efficacy of the new drug different from that of the standard drug?

High

Tags: Tests methods differences languages normal distribution statistics saliency data results visualization articles variances standards drugs testing mapping differences body weight content oxygen content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi Shulou Tech Info Apple Microsoft