hypothesis: hypothesis test a claim

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

a hypothesis test to test a claim about mu=H0 of a population.

Usage

1
hypothesis(TrnX = NULL, TrnY = NULL, m, u0, n1, n2, s1 = NULL, s2 = NULL, sigma1 = NULL, sigma2 = NULL, alpha = 0.05, method = "n", H0 = "u=u0", p)

Arguments

TrnX

the observed values of a random sample from a distribution which must be input as vectors

TrnY

the observed values of a random sample from another distribution which must be input as vectors

m

the mean of the bias of TrnX and TrnY

u0

the claim that H0: u=u0

n1

the amount of the sample TrnX

n2

the amount of the sample TrnY

s1

the standard deviation of the sample TrnX

s2

the standard deviation of the sample TrnY

sigma1

the standard deviation of the population TrnX

sigma2

the standard deviation of the population TrnY

alpha

the confident level of the hypothesis test

method

the distribution of the samples follow

H0

the claim about the population

p

p value which correspond to the z score

Details

you can either input the original data of TrnX and TrnY,or just input s1,s2,n1,n2

Value

refuse H0

at the confident level of alpha,we choose to refuse H0

we can not reject H0.

at the confident level of alpha,we choose not to refuse H0

Note

must input the distribution that the samples follow:normal distribution, standard normal distribution, chi-square and t-distribution.When there are two samples,please input m which is the average of TrnX-TrnY

Author(s)

Chengfeng Liu, Huiqing Liu, Yingyan Liang and Ruibin Feng Maintainer: Chengfeng Liu (478996606@qq.com)

See Also

conint

Examples

1
2
3
4
5
6
7
8
9
## to test the claim
 hypothesis(TrnX=c(3,4,5),TrnY=c(4,5,6),m,u0=4,3,3,s1=NULL,s2=NULL,sigma1=NULL,sigma2=NULL,alpha=0.05,method="n",H0="u=u0",p)
# "we can not reject H0."
# "t is"
# 4.302673
# "Q is"
# 0
# "p-value is"
# 1

Example output

[1] "we can not reject H0."
[1] "t is"
[1] 4.302673
[1] "Q is"
[1] 0
[1] "p-value is"
[1] 1

hypothesestest documentation built on May 2, 2019, 8:33 a.m.