<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=R_-_Errors_and_Power</id>
	<title>R - Errors and Power - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=R_-_Errors_and_Power"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=R_-_Errors_and_Power&amp;action=history"/>
	<updated>2026-05-14T01:26:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=R_-_Errors_and_Power&amp;diff=29316&amp;oldid=prev</id>
		<title>Bernard Szlachta at 02:35, 6 March 2016</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=R_-_Errors_and_Power&amp;diff=29316&amp;oldid=prev"/>
		<updated>2016-03-06T02:35:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Cat|Intro to R|082}}&lt;br /&gt;
&lt;br /&gt;
== Type I and Type II errors ==&lt;br /&gt;
                               Real World&lt;br /&gt;
 Null Hypothesis        &amp;#039;&amp;#039;&amp;#039;True&amp;#039;&amp;#039;&amp;#039;              &amp;#039;&amp;#039;&amp;#039;False&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Accept&amp;#039;&amp;#039;&amp;#039;         Correct Decision        Type II Error (β)&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Reject&amp;#039;&amp;#039;&amp;#039;         Type I Error (α)        Correct Decision&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
 Power is the probability of correctly rejecting a false null hypothesis&lt;br /&gt;
* E.g. the probability that:&lt;br /&gt;
** given there is a difference between the population means&lt;br /&gt;
** the sample means will be significantly different&lt;br /&gt;
* The probability of failing to reject a false null hypothesis is β&lt;br /&gt;
 Power = 1 - β&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 When designing an experiment you know the chance of finding a significant effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
Power is:&lt;br /&gt;
* The probability that the null hypothesis is true&lt;br /&gt;
* The probability that the null hypothesis is false&lt;br /&gt;
* The probability a false null hypothesis will be rejected&lt;br /&gt;
* The probability a true null hypothesis will be rejected&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the power of an experiment is low then:&lt;br /&gt;
* The experiment will likely be inconclusive&lt;br /&gt;
* Any significant findings obtained are suspect&lt;br /&gt;
* The results are skewed.&lt;br /&gt;
&lt;br /&gt;
== power.* function ==&lt;br /&gt;
 # Find the sample size&lt;br /&gt;
 power.t.test(power=0.9,sd=2,sig.level=0.05,delta=3)&lt;br /&gt;
&lt;br /&gt;
 # Find the power of the test&lt;br /&gt;
 power.t.test(n=2,sd=2,sig.level=0.05,delta=3)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PWR package ==&lt;br /&gt;
* pwr.p.test: test for one proportion (ES=h) &lt;br /&gt;
* pwr.2p.test: test for two proportions (ES=h)&lt;br /&gt;
* pwr.t.test: one sample and two samples (equal sizes) t tests for means (ES=d)&lt;br /&gt;
* pwr.t2n.test: two samples (different sizes) t test for means (ES=d)&lt;br /&gt;
* pwr.anova.test: test for one-way balanced anova (ES=f)&lt;br /&gt;
* pwr.r.test: correlation test (ES=r) &lt;br /&gt;
* pwr.f2.test: test for the general linear model&lt;br /&gt;
....&lt;br /&gt;
&lt;br /&gt;
== Pwr package ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;rsplus&amp;quot;&amp;gt;&lt;br /&gt;
 install.packages(&amp;quot;pwr&amp;quot;)&lt;br /&gt;
 library(&amp;quot;pwr&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bernard Szlachta</name></author>
	</entry>
</feed>