how can I determine the mean intervals given a confidence level of 98%?
4 次查看（过去 30 天）
Matthew Burman ，2015-1-20
评论： Star Strider ，2015-1-20
I have a table of values for two seperate timings for an experiment. Is there a coding I can follow to determine the mean intervals? Literally hit a brick wall on this question. Any help would be greatly appreciated. The data is as follows...
T1 (37.79 39.51 38.54 39.14 39.02 39.4 39.01 37.18) T2 (22.4 22.07 22.15 21.72 21.75 22.55 22.18 21.92) Confidence level = 98%
Youssef Khmou 2015-1-20
编辑：Youssef Khmou 2015-1-20
t1=[37.79 39.51 38.54 39.14 39.02 39.4 39.01 37.18];% T2 (22.4 22.07 22.15 21.72 21.75 22.55
t2=[22.4 22.07 22.15 21.72 21.75 22.55 22.18 21.92];
You have to look for critical value t from table, assuming that the samples are small, drawn from normal distribution with known variance. Additionally, the variables are not correlated.
% Confidence ranges
The means are easy:
T1 = [37.79 39.51 38.54 39.14 39.02 39.4 39.01 37.18];
T2 = [22.4 22.07 22.15 21.72 21.75 22.55 22.18 21.92];
T1mean = mean(T1);
T2mean = mean(T2);
The confidence intervals aren’t. What are your data? Consider that ‘timings’ (and I have no idea what you mean by that) could be modeled as a Poisson process, so you would have to use the poissfit and poissinv functions.
If your data are something else, you could conceivably model them as exponentially distributed or even normally distributed. Without knowing more, I have no idea.
The point is that the confidence interval calculation is not trivial, and requires that you understand the statistical properties of the process that generated your data in order to calculate them correctly.
In that situation, you can assume they are normally distributed, but given that you have only 8 observations in each vector, they are actually t-distributed. Use the tinv function to calculate the confidence intervals. If you want to see if ‘T1’ and ‘T2’ are statistically different, use the ttest function. See the ‘Examples’ -> ‘Paired-Sample t-Test’ for details. (You may need to consult a reference to determine how to calculate the degrees-of-freedom for both the confidence interval and t-test.)
Find more on Half-Normal Distribution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!