confidenceInterval - function vec =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function vec = confidenceInterval(vecd,cl,fn) %In statistics, we often use confidence intervals to estimate the value %of an unknown population parameter based on sample data. Write a %function that will take in a vector of sample data and a specified %confidence level, and will return the confidence interval for the %population mean. The formula for this is: % m +/- t*s/sqrt(n) %where m is your sample mean %s is your sample standard deviation %n is the size of your data %t is your probability statistic. % %To calculate your probability statistic, you will be given a csv file %of the t-statistic table (t_table.csv). You will need to read in this %table using your LLcsv function from HW 8 and then find the appropriate %t-stat. The t-stat is based on two values: the degrees of freedom (df %= n-1), and the confidence level (1-a). So if you're sample has size n %= 4, and you wish to compute an a = 90% confidence interval, you would %use the t-stat for df = 3, (1-a) = 0.1 . The t-table is formatted as
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

Page1 / 2

confidenceInterval - function vec =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online