Recommended problems

1. problem We want to check whether the boxes has 90 tissues in them. Let us suppose, the the deviation is 4.5.

sampsizepwr('t',[90,4.5],89, 0.95)
% * And on 99% confidence level?
sampsizepwr('t',[90,4.5],89, 0.99)
% * Answers these two questions as a customer (we only care if there are
% less),
sampsizepwr('t',[90,4.5],89, 0.95,[],'Tail','left')
ans =

   266


ans =

   374


ans =

   221

sampsizepwr('t',[90,4.5],89, 0.99,[],'Tail','left')
% * and as a quality controller (every difference is a problem).

% we already got the answer in the first part.
ans =

   321

2. problem We want to test the effectiveness of a new antipyretic. We measured the temperatures of 10 people before taking the drug and got the following temperatures: 38.1, 39.2, 37.9, 38.3, 39.5, 39.4, 38.5, 39.1, 38.4, 39.1 Half an hour after taking the drugs: 37.3, 36.9, 37.3, 37.2, 38.2, 37.4, 36.5, 37.3, 37.4, 36.8. What is our null hypothesis? What is the alternative hypothesis? What sort of test we should apply?

before=[38.1, 39.2, 37.9, 38.3, 39.5, 39.4, 38.5, 39.1, 38.4, 39.1];
after=[37.3, 36.9, 37.3, 37.2, 38.2, 37.4, 36.5, 37.3, 37.4, 36.8];

Null hypothesis: the temperatures are the same, Alternative hypotheses: the temperature after taking the drug are lower. We apply two sample, one sided t-test.

ttest2(before, after,'Tail', 'right')
ans =

     1