Confidence Interval Calculator (t statistics)


Free Statistics Help Resources

ยป Confidence Interval Calculator for μ - Unknown Population Standard Deviation

Use this calculator if you want to compute a confidence interval for a population mean when the population standard deviation is unknown, in which case the t-distribution is used. You have information about the sample mean and sample size.

(Observe that for this interval to be meaningful, the distribution of the population being studied needs to be normal, or at least approximately normal).


[insert_php]
$root_path = "/home/timeofwa/homeworkfactory.com";
require_once $root_path . "/wp-content/php_includes/FormFunctions.php";
$solver_name = "confidence-interval-calculator-mean-t";
echo_form_start(); //Starts the form (with DIV for style)
echo_anchor_results(); //The point where the browser will scroll for the results
echo_begin_div_table();
input_line('Sample Mean (\(\bar X\))','xbar',100); //Input line
input_line('Sample St. Dev. (\(s\))','stdev',101); //Input line
input_line('Sample Size (\(n\))','ssize',102); //Input line
input_line('Confidence Level','conflev',103,10,"","(Ex: 0.99, 0.95, or 99, 95 without '%', etc)"); //Input line
echo_end_div_table();
echo_hidden_input($solver_name); //Hidden input for validation
include "adsinc/mathcracker-responsive1.php";
echo_submit("Calculate",106); //Submit button
echo_form_end(); //End form
[/insert_php]

[insert_php]
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST[$solver_name] == $solver_name)
{

//******************************************************
//FETCH THE POST PARAMETERS
//******************************************************
$xbar = $_POST['xbar'];
$stdev = $_POST['stdev'];
$ssize = $_POST['ssize'];

if ($_POST['conflev']>=1)
$conflev = $_POST['conflev']/100;
else
$conflev = $_POST['conflev'];

//******************************************************
//CALL THE REQUIRED PHP LIBRARIES
//******************************************************
require_once $root_path . "/wp-content/MathLibraries/Solver_ConfidenceIntervalMeanTClass.php";

//****************************************
//RENDER THE SOLUTION AND ERRORS
//****************************************
try{
//**************************************************
//INSTANTIATE OBJECT, ECHO STEPS AND ERRORS
//**************************************************
$oSolver = new ConfidenceIntervalMeanTCalculator($xbar, $stdev, $ssize, $conflev);
$oSolver->EchoSteps();
$oSolver->EchoSpecificErrors();

}
catch(Exception $e){
echo "Something went wrong: ", $e->getMessage(), "\n";
}
}
[/insert_php]

log in

reset password

Back to
log in