Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Basic normal and t table questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110064] Re: Basic normal and t table questions
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Tue, 1 Jun 2010 04:19:39 -0400 (EDT)

On 5/30/10 at 6:48 AM, canopus56 at yahoo.com (Canopus56) wrote:

>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?

The inverse function to CDF in Mathematica is Quantile. Using
your first example, I can do as follows:

In[39]:= p = (1 - CDF[NormalDistribution[187000, 2181.9716], 190000])

Out[39]= 0.0845807

In[40]:= zscore = Quantile[NormalDistribution[], 1 - p]

Out[40]= 1.3749

The standard z-score. And to show Quantile is the inverse
function to CDF

In[41]:= Quantile[NormalDistribution[187000, 2181.9716], 1 - p]

Out[41]= 190000.

or using the computed zscore

In[42]:= zscore 2181.9716 + 187000

Out[42]= 190000.

Quantile also solves the second problem as well. But here you
need to understand what is being done after loading
HypothesisTesting and using StudentTPValue

First, doing

In[43]:= StudentTPValue[-0.1373, 6, TwoSided -> True]

Out[43]= TwoSidedPValue->0.895285

and doing

In[45]:= p = 2 CDF[StudentTDistribution[6], -0.1373]

Out[45]= 0.895285

results in the same p-Value. So,

In[46]:= Quantile[StudentTDistribution[6], p/2]

Out[46]= -0.1373

gives the desired result



  • Prev by Date: Re: Problems running Mathematica and WordMS together in
  • Next by Date: Re: Expanding Integrals with constants and 'unknown' functions
  • Previous by thread: Re: Problems running Mathematica and WordMS together in
  • Next by thread: Re: Assigning values to a list.