主要内容

tinv

Student'st反向分布函数

Description

example

x= tinv(p,nu)返回学生的反向分布函数(ICDF)tdistribution evaluated at the probability values inpusing the corresponding degrees of freedom innu.

Examples

collapse all

Find the 95th percentile of the Student'stdistribution with50自由程度。

p = .95; nu = 50; x = tinv(p,nu)
x = 1.6759

计算学生的第99个百分点tdistribution for1to6自由程度。

百分位数= TINV(0.99,1:6)
百分位数=1×631.8205 6.9646 4.5407 3.7469 3.3649 3.1427

Find a 95% confidence interval estimating the mean of a population by usingtinv.

Generate a random sample of size100drawn from a normal population with mean10和standard deviation2.

亩= 10; sigma = 2; n = 100; rngdefault%可再现性x = normrnd(mu,sigma,n,1);

Compute the sample mean, standard error, and degrees of freedom.

xbar =平均值(x);se = std(x)/sqrt(n);nu = n -1;

找到上下置信度范围95%confidence interval.

conf = 0.95; alpha = 1 - conf; pLo = alpha/2; pUp = 1 - alpha/2;

Compute the critical values for the confidence bounds.

crit = tinv([Plo pup],nu);

Determine the confidence interval for the population mean.

CI = XBAR + CRIT*SE
ci =1×29.7849 10.7075

这个置信区间与ci返回的值ttest of a null hypothesis that the sample comes from a normal population with mean.

[h,p,ci2] = ttest(x,mu,'Α',α);CI2
CI2=2×19.7849 10.7075

Input Arguments

collapse all

评估ICDF的概率值,指定为标量值或标量值数组,每个元素在该范围内[0,1].

  • To evaluate the icdf at multiple values, specifypusing an array.

  • To evaluate the icdfs of multiple distributions, specifynuusing an array.

If either or both of the input argumentspnuare arrays, then the array sizes must be the same. In this case,tinvexpands each scalar input into a constant array of the same size as the array inputs.Each element inx是由相应元素指定的分布的ICDF值nu, evaluated at the corresponding probability inp.

Example:[0.1 0.5 0.9]

Data Types:single|double

Degrees of freedom for the Student'stdistribution, specified as a positive scalar value or an array of positive scalar values.

  • To evaluate the icdf at multiple values, specifypusing an array.

  • To evaluate the icdfs of multiple distributions, specifynuusing an array.

If either or both of the input argumentspnuare arrays, then the array sizes must be the same. In this case,tinvexpands each scalar input into a constant array of the same size as the array inputs.Each element inx是由相应元素指定的分布的ICDF值nu, evaluated at the corresponding probability inp.

Example:[9 19 49 99]

Data Types:single|double

Output Arguments

collapse all

icdf values evaluated at the probabilities inp, returned as a scalar value or an array of scalar values.xis the same size aspnuafter any necessary scalar expansion.Each element inx是由相应元素指定的分布的ICDF值nu, evaluated at the corresponding probability inp.

More About

collapse all

Student’sticdf

The Student'stdistribution is a one-parameter family of curves. The parameterν的自由度。The Student'stdistribution has zero mean.

Thetinverse function is defined in terms of the Student'stcdf as

x = F 1 ( p | ν ) = { x : F ( x | ν ) = p } ,

where

p = F ( x | ν ) = x γ ( ν + 1 2 ) γ ( ν 2 ) 1 ν π 1 ( 1 + t 2 ν ) ν + 1 2 d t ,

νis the degrees of freedom, and Γ( · ) is the Gamma function. The resultxis the solution of the integral equation where you supply the probabilityp.

有关更多信息,请参阅学生的t分布.

替代功能

  • tinv是针对学生的功能tdistribution. Statistics and Machine Learning Toolbox™ also offers the generic functionicdf, which supports various probability distributions. To useicdf,指定概率分布名称及其参数。请注意,特定于分布的功能tinvis faster than the generic functionicdf.

Extended Capabilities

C/C++ Code Generation
使用MATLAB®CODER™生成C和C ++代码。

Version History

在R2006a之前引入