MATLAB Answers

how can I determine the mean intervals given a confidence level of 98%?

Matthew Burman 님이 질문을 제출함. 20 Jan 2015
최근 활동 Star Strider 님이 댓글을 추가함. 20 Jan 2015
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%

  댓글 수: 0

로그인 to comment.


답변 수: 2

Answer by Youssef Khmou
on 20 Jan 2015
Edited by Youssef Khmou
on 20 Jan 2015

Try :
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];
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

  댓글 수: 0

로그인 to comment.

Answer by Star Strider
on 20 Jan 2015

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.

  댓글 수: 2

Thanks for getting back to me. Basically the question is based on an experiment of a cart rolling down a slope. The experiment is repeated 8 times in milliseconds and the data is given in the t1 and t2 lists in my original post. The question asked me to determine the mean intervals for both t1 and t2 given that the confidence level is 98%
My pleasure.
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.)

로그인 to comment.

Translated by