Re: Basic normal and t table questions
- To: mathgroup at smc.vnet.net
- Subject: [mg110054] Re: Basic normal and t table questions
- From: Barrie Stokes <Barrie.Stokes at newcastle.edu.au>
- Date: Sun, 30 May 2010 23:46:56 -0400 (EDT)
Hi Kurt In[46]:= Off[ Solve::"ifun" ] sol = Solve[ (1 - CDF[NormalDistribution[0, 1], z]) == 0.025, z ][[1]] Out[47]= {z -> 1.95996} In[48]:= z95 = z /. sol Out[48]= 1.95996 Thus: In[49]:= pValue2Sided = 2*(1 - CDF[NormalDistribution[0, 1], z95]) Out[49]= 0.05 And: In[50]:= zScore = Quantile[ NormalDistribution[ 0, 1 ], pValue2Sided/2 ] {zScore, -zScore} Out[50]= -1.95996 Out[51]= {-1.95996, 1.95996} In[52]:= Off[ Solve::"ifun" ] sol = Solve[ (1 - CDF[NormalDistribution[0, 1], z]) == 0.05, z ][[1]] Out[53]= {z -> 1.64485} In[54]:= z90 = z /. sol Out[54]= 1.64485 Thus In[55]:= pValue2Sided = 2*(1 - CDF[NormalDistribution[0, 1], z90]) Out[55]= 0.1 In[56]:= zScore = Quantile[ NormalDistribution[ 0, 1 ], pValue2Sided/2 ] {zScore, -zScore} Out[56]= -1.64485 Out[57]= {-1.64485, 1.64485} Cheers Barrie >>> On 30/05/2010 at 8:48 pm, in message <201005301048.GAA29139 at smc.vnet.net>, Canopus56 <canopus56 at yahoo.com> wrote: > I am taking an intro to stats class and am trying to learn some Mathematica > functions related to basic statistics. > > I would like to use Mathematica to calculate exact values and inverse values > from the standard normal table and Student's t distribution table. > > For example, the following returns the cdf equvialent to standard normal > distribution table for a known mu, sigma (STD) and target x-bar: > > (1 - CDF[NormalDistribution[187000, 2181.9716], 190000]) > > The following returns the two-sided t-distribution value for a known > z-statistic: > > StudentTPValue[-0.1373, 6, TwoSided -> True] > > Q1) How do I get the inverse of these, which the equivalent of reading a cdf > table and a t-distribution table backwards, i.e. - > > a) Given a cdf, how do I return the z-statistic from a standard normal > distribution? > > b) Given a P-Value and sampling distribution size, how did I return the z-star > critical test value? > > Thanks - Kurt