Basics of Hypothesis testing for Pharmacy

3,699 views 31 slides Nov 14, 2021
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

This presentation will clarify all basic concepts and terms of hypothesis testing. It will also help you to decide correct Parametric & Non-Parametric test for your data


Slide Content

Basics of HYPOTHESIS TESTING for PHARMACY Dr Parag Shah | M.Sc., M.Phil., Ph.D. ( Statistics) [email protected] www.paragstatistics.wordpress.com

Basic Concept of HYPOTHESIS TESTING

Types of Analysis

Descriptive & Inferential Statistics Descriptive Statistics uses the data to provide descriptions of the population / sample, either through numerical calculations or graphs or tables. Inferential Statistics makes inferences and predictions about a population based on a sample of data taken from the population.

Inferential Statistics The methods of inferential statistics are the estimation of parameter(s) testing of Statistical hypothesis

Parameter and Statistics A measure calculated from population data is called Parameter . A measure calculated from sample data is called Statistic . Parameter Statistic Mean μ x̄ Standard deviation σ s Proportion P p Correlation coefficient ρ r

Estimation Estimation is a process whereby we select a random sample from a population and use a sample statistic to estimate a population parameter. There are two ways for estimation: Point Estimation Interval Estimation

Point Estimate Point Estimate – A sample statistic used to estimate the exact value of a population parameter. A point estimate is a single value and has the advantage of being very precise but there is no information about its reliability. The probability that a single sample statistic actually equal to the parameter value is extremely small. For this reason point estimation is rarely used.

Interval Estimate Confidence interval (Interval Estimate) A range of values defined by the confidence level within which the population parameter is estimated to fall. The interval estimate is less precise, but gives more confidence.

TESTING OF HYPOTHESIS

Statistical Hypothesis A Statistical hypothesis is an assumption or any logical statement about the parameter of the population. E.g. Patients suffering from Chikungunya takes on an average more time to fully recover than patients suffering from Dengue The average annual income of Indian farmer in 2018 is 78000 Rs. Proportion of diabetic patients in Gujarat is not more than 15 %

Null hypothesis A Null hypothesis is a general statement about population parameter or about relation between two population parameters. It is denoted by H0. In Null hypothesis if the parameter assumes specific value then it is called Simple hypothesis. E.g. , P=0.10 In Null hypothesis if the parameter assumes set of values then it is called Composite hypothesis . E.g. , P 0.10  

Alternative Hypothesis A statistical hypothesis which is complementary to the Null hypothesis is called Alternative hypothesis . It is denoted by H1.

Testing of Hypothesis The procedure to decide whether to accept or reject the null hypothesis is called Testing of hypothesis.

Type I and Type II Error The error of rejecting the true null hypothesis is called Type I error. Similar to False Positive. The probability of type I error is denoted by . = Prob [ Reject H0 / H0 is true] The error of accepting the false null hypothesis is called Type II error. Similar to False Negative. The probability of type II error is denoted by . = Prob [ Accept H0 / H0 is false]  

Type I and Type II Error DECISION Null Hypothesis TRUE FALSE REJECT Type I Error False Positive Probability = α No Error True Positive Probability =1- β NOT REJECTED No Error True Negative Probability = 1- α Type II Error False negative Probability = β

Level of Significance The predetermined value of probability of type I error is called level of significance . It is denoted by . The most commonly used level of significance are 1% or 5%. Interpretation : 5% level of significance means in 5 out of 100 cases, it is likely to reject a true null hypothesis .  

Critical Region The area of the probability curve corresponding to is called critical region . i.e. the area under normal curve at which a true null hypothesis is rejected is called area of rejection or critical region.  

Power of Test The probability of rejecting the false null hypothesis is called the Power of the test. It is denoted by 1- . i.e. 1- = Prob [ Reject H0 / H0 is false]  

P value P -value ≡ the probability the test statistic would take a value as extreme or more extreme than observed test statistic, when H is true. Smaller-and-smaller P -values → stronger-and-stronger evidence against H For typical analysis, using the standard α = 0.05 cutoff, the null hypothesis is - rejected when p < = .05 and - not rejected when p > .05.

Steps of Testing of Hypothesis Step 1 : Setting up Null hypothesis Step 2 : Setting up Alternative hypothesis Step3 : Check assumptions of the test Step 4 : Determining the p value Step 5 : Conclusion If p Level of significance ( ), We Reject Null hypothesis If p Level of significance ( ), We fail to Reject Null hypothesis  

Some of the tests Testing single mean Testing significant difference between two means Testing single proportion Testing significant difference between two proportions Testing single standard deviation Testing two standard deviations Testing means for more than two samples Testing standard deviations for more than two samples Testing proportion for more than two samples Testing for non-normal populations Testing correlation and regression coefficients

Deciding Test Parameter Categorical (Binary)

t test for single mean Step 1 : Null hypothesis H0: Step 2 : Alternative hypothesis H1: or or Step 3: Check Assumptions Step 4 : Test statistic – t and p value Step 5 : Conclusion If p Level of significance ( ), We Reject Null hypothesis If p Level of significance ( ), We fail to Reject Null hypothesis   Assumptions Tests The population from which the sample drawn is assumed as Normal distribution Shapiro-Wilks / qq plot The population variance is unknown ____ Assumptions Tests The population from which the sample drawn is assumed as Normal distribution Shapiro-Wilks / qq plot ____

t test for means of two independent samples Step 1 : Null hypothesis H0: Step 2 : Alternative hypothesis H1: or or Step 3 : Check Assumptions Step 4 : Test statistic – t and p value Step 5 : Conclusion If p Level of significance ( ), We Reject Null hypothesis If p Level of significance ( ), We fail to Reject Null hypothesis   Assumptions Tests The population from which two samples drawn are assumed as Normal distribution Shapiro-Wilks / qq plot Two population variance are unknown (Equal / Unequal) F test The two samples are independently distributed ____

t test for Equal Variances t test for Unequal Variances (Welch t test) d.f. = where

t test for means of two dependent samples (Paired t test) Step 1: Null hypothesis H0: Step 2 : Alternative hypothesis H1: Step 3 : Check Assumptions Step 4 : Test statistic – t and p value Step 5 : Conclusion If p Level of significance ( ), We Reject Null hypothesis If p Level of significance ( ), We fail to Reject Null hypothesis   Assumptions Tests The difference between the two samples are normally distributed. Two-sample Kolmogorov-Smirnov test / qq plot The difference between the two samples are independently distributed ____ The two samples are independently distributed ____

Effect Size Effect size  is a statistical concept that measures the strength of the relationship between two variables on a numeric scale.  Statistic effect size helps us in determining if the difference is real or if it is due to a change of factors.

Effect Size In  Meta-analysis , effect size is concerned with different studies and then combines all the studies into single analysis.  In statistics analysis, the effect size is usually measured in three ways: standardized mean difference odd ratio correlation coefficient.

Effect Size Cohen’s   is the measure of the difference between two means divided by the pooled standard deviation. where It is important to note that Cohen’s does not provide a level of confidence as to the magnitude of the size of the effect comparable to the other tests of hypothesis. The sizes of the effects are simply indicative.   Size of effect Small 0.2 Medium 0.5 Large 0.8 Size of effect Small 0.2 Medium 0.5 Large 0.8

Example where   If =11, Calculate Cohen’s    and interpret the difference. Solution : Cohen’s  = 0.384 The effect is small because 0.384 is between Cohen’s value of 0.2 for small effect size and 0.5 for medium effect size. The size of the differences of the means for the two samples is small indicating that there is not a significant difference between them.   Size of effect Small 0.2 Medium 0.5 Large 0.8 Size of effect Small 0.2 Medium 0.5 Large 0.8