<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/zequiv</title><revhistory><revision><revnumber>4</revnumber><date>2013-03-08 10:17:39</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>3</revnumber><date>2007-10-19 09:39:48</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2007-10-19 09:39:17</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2007-10-19 09:38:52</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>Equivalence test formulation of one sample z-test</title><para>For a population mean, $$\theta$$ estimated by a sample mean: </para><para>H0: $$\theta \leq $$-d or $$\theta \geq$$ d and  HA : -d $$ \leq \theta \leq$$ d </para><para>If ind equals 1 then we reject nonequivalence so -d $$\leq$$ $$\theta$$ $$\leq$$ d otherwise we accept the null hypothesis of equivalence for the given type II error, beta. </para><para>[TYPE INTO R THE DESIRED INPUTS D, N, MEAN AND BETA USING VALUES IN FORM BELOW].  </para><screen><![CDATA[beta <- 0.05
d <- 0.2
n <- 10
mean <- 0]]></screen><para>[THEN COPY AND PASTE THE BELOW INTO R] </para><screen><![CDATA[cv <- sqrt(qchisq(p=beta, df=1, ncp=n*d^2))
cv2 <- sqrt(n)*cv
ind <- 0
if (mean < cv2) ind = 1
print(ind)]]></screen></section></article>