Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_hypothesismean2.wasp
Title produced by softwareTesting Mean with known Variance - p-value
Date of computationThu, 13 Nov 2008 10:27:04 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Nov/13/t12265972570tj7he0cw52wx9n.htm/, Retrieved Sun, 19 May 2024 12:38:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24721, Retrieved Sun, 19 May 2024 12:38:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Testing Mean with known Variance - Type II Error] [Pork Q3] [2008-11-12 10:44:51] [de72ca3f4fcfd0997c84e1ac92aea119]
F RMP     [Testing Mean with known Variance - p-value] [W4Q2] [2008-11-13 17:27:04] [434228f9e3c7eaa307f0fb12855e2147] [Current]
Feedback Forum
2008-11-20 13:08:11 [Jolien Van Landeghem] [reply
Juist. Als we een klacht indienen hebben we 41% kans dat deze klacht ongegrond is. Dit omdat de p value groter is dan de alpha fout, zoals de student juist vaststelde.
2008-11-24 16:59:38 [Nathalie Daneels] [reply
Evaluatie opdracht 1 - Blok 9 (Q2)

De conclusie van de student is onvolledig en zou kunnen aangevuld worden:
In de opdracht staat dat we een sterk vermoeden hebben dat de leverancier 'cheap pork' levert. Dit kunnen we ook op 2 manieren opvatten (net zoals we Q1 op 2 manieren kunnen opvatten). We moeten dit ook wel verantwoorden:
- We kunnen stellen dat 'cheap pork' vlees is dat teveel vet bevat en teweinig vlees. We betalen in dat geval teveel voor wat we krijgen: We verwachten een bepaald percentage vlees en krijgen voor een stuk van dat percentage (bijkomend) vet. We gaan dus kijken naar de one-tailed test. We berekenen bij deze opdracht de p-value: Die duidt de waarschijnlijkheid aan dat onze ingediende klacht onterecht is. Deze bedraagt hierbij 41%: Dit betekent dat als we een klacht indienen dat het vlees teveel vet bevat, de kans dat deze klacht onterecht is gelijk is aan 41%, wat dus vrij hoog is.
De p-waarde handelt over de nieuwe oppervlakte van het type I error. Die nieuwe oppervlakte hangt af van de verdeling van de grafiek en van de kritische waarde. In dit geval kunnen we stellen dat het type I error vergroot is. (Eerst was dit 5% en nu 41%). Dit betekent dat we de nulhypothese niet moeten verwerpen. Een hoge p-value wil dus zeggen dat, indien je klacht indient en die is onterecht, dan ga je hoge gerechtskosten moeten betalen.(41% kans dat je klacht onterecht was)
- Je kan ook de two-tailed test beschouwen. Hierbij stellen we dat 'cheap pork' zowel het vlees is met teveel vet als het vlees met te weinig vet. In dat geval bedraagt de p-value 82%. Dit betekent dus dat als we een klacht indienen, de kans dat deze klacht onterecht is gelijk is aan 82%. De p-value is hier ook duidelijk hoger dan het type I error (5%).

Conclusie: we kunnen dus stellen dat men beter geen klacht kan indienen want de kans dat we gerechtskosten moeten betalen (dit moet als je een klacht indient, die onterecht is) is veel te groot.
2008-11-24 18:22:38 [Yannick Van Schil] [reply
klopt, de p-value is hier duidelijk groter als de alfa-fout, de nul-hypothese mag dus niet verworpen worden en het verschil tussen 15% en 15.46% is dus aan het toeval te wijten
2008-11-24 20:09:50 [Annemiek Hoofman] [reply
Ik had hieraan nog kunnen toevoegen dat men de p-value (one-tailed) van 41% moet vergelijken met de significantiegrens van 5%. Indien de p-value groter is dan die grens, zal het verschil tussen het vereiste vetpercentage en de sample mean te wijten aan het toeval. Dit geld voor 95% van de gevallen, aangezien ik de typeI-error ingesteld hebt op 0.05.

Post a new message




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24721&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24721&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24721&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Testing Mean with known Variance
sample size27
population variance0.012
sample mean0.1546
null hypothesis about mean0.15
type I error0.05
Z-value0.218197158551618
p-value (one-tailed)0.413637749448374
p-value (two-tailed)0.827275498896748
conclusion for one-tailed test
Do not reject the null hypothesis.
conclusion for two-tailed test
Do not reject the null hypothesis

\begin{tabular}{lllllllll}
\hline
Testing Mean with known Variance \tabularnewline
sample size & 27 \tabularnewline
population variance & 0.012 \tabularnewline
sample mean & 0.1546 \tabularnewline
null hypothesis about mean & 0.15 \tabularnewline
type I error & 0.05 \tabularnewline
Z-value & 0.218197158551618 \tabularnewline
p-value (one-tailed) & 0.413637749448374 \tabularnewline
p-value (two-tailed) & 0.827275498896748 \tabularnewline
conclusion for one-tailed test \tabularnewline
Do not reject the null hypothesis. \tabularnewline
conclusion for two-tailed test \tabularnewline
Do not reject the null hypothesis \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24721&T=1

[TABLE]
[ROW][C]Testing Mean with known Variance[/C][/ROW]
[ROW][C]sample size[/C][C]27[/C][/ROW]
[ROW][C]population variance[/C][C]0.012[/C][/ROW]
[ROW][C]sample mean[/C][C]0.1546[/C][/ROW]
[ROW][C]null hypothesis about mean[/C][C]0.15[/C][/ROW]
[ROW][C]type I error[/C][C]0.05[/C][/ROW]
[ROW][C]Z-value[/C][C]0.218197158551618[/C][/ROW]
[ROW][C]p-value (one-tailed)[/C][C]0.413637749448374[/C][/ROW]
[ROW][C]p-value (two-tailed)[/C][C]0.827275498896748[/C][/ROW]
[ROW][C]conclusion for one-tailed test[/C][/ROW]
[ROW][C]Do not reject the null hypothesis.[/C][/ROW]
[ROW][C]conclusion for two-tailed test[/C][/ROW]
[ROW][C]Do not reject the null hypothesis[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24721&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24721&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Testing Mean with known Variance
sample size27
population variance0.012
sample mean0.1546
null hypothesis about mean0.15
type I error0.05
Z-value0.218197158551618
p-value (one-tailed)0.413637749448374
p-value (two-tailed)0.827275498896748
conclusion for one-tailed test
Do not reject the null hypothesis.
conclusion for two-tailed test
Do not reject the null hypothesis



Parameters (Session):
par1 = 27 ; par2 = 0.012 ; par3 = 0.1546 ; par4 = 0.15 ; par5 = 0.05 ;
Parameters (R input):
par1 = 27 ; par2 = 0.012 ; par3 = 0.1546 ; par4 = 0.15 ; par5 = 0.05 ;
R code (references can be found in the software module):
par1<-as.numeric(par1)
par2<-as.numeric(par2)
par3<-as.numeric(par3)
par4<-as.numeric(par4)
par5<-as.numeric(par5)
c <- 'NA'
csn <- abs(qnorm(par5))
csn2 <- abs(qnorm(par5/2))
z <- (par3 - par4) / (sqrt(par2/par1))
p <- 1-pnorm(z)
if (par3 == par4)
{
conclusion <- 'Error: the null hypothesis and sample mean must not be equal.'
conclusion2 <- conclusion
} else {
if (p < par5/2)
{
conclusion2 <- 'Reject the null hypothesis'
} else {
conclusion2 <- 'Do not reject the null hypothesis'
}
}
if (p < par5)
{
conclusion <- 'Reject the null hypothesis.'
} else {
conclusion <- 'Do not reject the null hypothesis.'
}
p
conclusion
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('ht_mean_knownvar.htm','Testing Mean with known Variance','learn more about Statistical Hypothesis Testing about the Mean when the Variance is known'),2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'sample size',header=TRUE)
a<-table.element(a,par1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'population variance',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'sample mean',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'null hypothesis about mean',header=TRUE)
a<-table.element(a,par4)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'type I error',header=TRUE)
a<-table.element(a,par5)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Z-value',header=TRUE)
a<-table.element(a,z)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-value (one-tailed)',header=TRUE)
a<-table.element(a,p)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-value (two-tailed)',header=TRUE)
a<-table.element(a,p*2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'conclusion for one-tailed test',2,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,conclusion,2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'conclusion for two-tailed test',2,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,conclusion2,2)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')