Inferential Statistical Functions

  1. Confidence Intervals - One population mean
  2. Hypothesis Tests - One population mean
  3. Confidence Intervals - Two Population means
  4. Hypothesis Tests - Two Population means
  5. Inferences for Standard deviations
  6. Inferences for Proportions
  7. Chi-Square procedures

Confidence Intervals - One population mean

The following tests have been implemented. You may consult the Function Reference for detailed use and examples. The tests compute the confidence intervals, margin of error and print some other useful information.

Function ci_onesample_zreqsize() returns the sample size required to compute a confidence level for the mean with margin of error E, known standard deviation std, and confidence level cl.

Hypothesis Tests - One population mean

The following tests have been implemented. You may consult the Function Reference for detailed use and examples. The tests compute P values, print useful information and a message indicating the outcome of the test.

Function ht_onesample_ztypeIIerror() returns the probability of making the Type II Error associated with the Z-Test above.

Function ht_onesample_zpower() returns the Power (Power=1-P(Type II error)).

(See NOTE below)

For example, given a mean equal to 26, a sample size of 30, a standard deviation equal to 1.4, a 0.05 significance level, a true mean equal to 25, and assuming this is a left tail test (type=0), then the power (probability of making the Type II Error) is:


ht_onesample_zpower(26, 30, 1.4, .05, 25, 0)
0.9883

You may build a function that returns the power as a function of the true mean for different values of the other parameters. For example, for n=30 and n=100, the following two functions return the power as a function of the true mean. A plot of the functions is also presented.


p30(x) = ht_onesample_zpower(26, 30, 1.4, .05, x, 0)
p30(x) = ht_onesample_zpower(26, 30, 1.4, .05, x, 0)
p100(x) = ht_onesample_zpower(26, 100, 1.4, .05, x, 0)
p100(x) = ht_onesample_zpower(26, 100, 1.4, .05, x, 0)
plot( p30, 24.8, 26, 50)
plot( p100, 24.8, 26, 50, "red")

Figure 1. Power as a function of the true mean for a sample size of n=30 and n=100.

Confidence Intervals - Two Population means

The following tests have been implemented. You may consult the Function Reference for detailed use and examples. The tests compute the confidence intervals, margin of error and print some other useful information.

Hypothesis Tests - Two Population means

The following tests have been implemented. You may consult the Function Reference for detailed use and examples. The tests compute P values, print useful information and a message indicating the outcome of the test.

Inferences for Standard deviations

The following functions have been implemented. They print useful information and a message with the outcome of the test. Detailed information and examples of use can be found in the Function Reference.

Inferences for Proportions

The following functions have been implemented. They print useful information and a message with the outcome of the test. Detailed information and examples of use can be found in the Function Reference.

Chi-Square procedures

The following functions have been implemented. They print useful information and a message with the outcome of the test. Detailed information and examples of use can be found in the Function Reference.





NOTE: The data used in this example was taken from the textbook Introductory Statistics 6th Ed. by Neil A. Weiss with kind permission of Addison Wesly Longman, Inc. (AWL). AWL does not endorse nor it supports the Calcugator.