Two-way ANOVA

2,940views

test

00:00 / 00:00

Two-way ANOVA

Back to the Basic Sciences

Diagnoses

Anatomy of the coronary circulation
Anatomy clinical correlates: Heart
Coronary artery disease: Pathology review
Anticoagulants: Direct factor inhibitors
Anticoagulants: Heparin
Antiplatelet medications
Thrombolytics
Renal failure: Pathology review
ACE inhibitors, ARBs and direct renin inhibitors
Anatomy of the lungs and tracheobronchial tree
Anatomy clinical correlates: Pleura and lungs
Alveolar surface tension and surfactant
Breathing cycle and regulation
Gas exchange in the lungs, blood and tissues
Pulmonary shunts
Regulation of pulmonary blood flow
Respiratory system anatomy and physiology
Ventilation
Ventilation-perfusion ratios and V/Q mismatch
Zones of pulmonary blood flow
Obstructive lung diseases: Pathology review
Anatomy of the abdominal viscera: Liver, biliary ducts and gallbladder
Anatomy clinical correlates: Other abdominal organs
Bile secretion and enterohepatic circulation
Liver anatomy and physiology
Cirrhosis: Pathology review
Anatomy of the heart
Anatomy of the coronary circulation
Anatomy of the inferior mediastinum
Anatomy of the superior mediastinum
Anatomy clinical correlates: Heart
Anatomy clinical correlates: Mediastinum
Cardiac afterload
Cardiac contractility
Cardiac cycle
Cardiac preload
Cardiac work
Cardiovascular system anatomy and physiology
Changes in pressure-volume loops
Frank-Starling relationship
Measuring cardiac output (Fick principle)
Microcirculation and Starling forces
Pressure-volume loops
Stroke volume, ejection fraction, and cardiac output
Heart failure: Pathology review
Anatomy of the coronary circulation
Anatomy clinical correlates: Heart
Cardiovascular system anatomy and physiology
Atherosclerosis and arteriosclerosis: Pathology review
Coronary artery disease: Pathology review
Anatomy of the cerebral cortex
Anatomy of the limbic system
Anatomy clinical correlates: Cerebral hemispheres
Dementia: Pathology review
Mood disorders: Pathology review
Selective serotonin reuptake inhibitors
Serotonin and norepinephrine reuptake inhibitors
Tricyclic antidepressants
Monoamine oxidase inhibitors
Atypical antidepressants
Pancreas histology
Diabetes mellitus: Pathology review
Dyslipidemias: Pathology review
Lipid-lowering medications: Fibrates
Lipid-lowering medications: Statins
Miscellaneous lipid-lowering medications
Enteric nervous system
Esophageal motility
Gastrointestinal system anatomy and physiology
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Hypertension: Pathology review
ACE inhibitors, ARBs and direct renin inhibitors
Adrenergic antagonists: Beta blockers
Calcium channel blockers
Thiazide and thiazide-like diuretics
Anatomy of the thyroid and parathyroid glands
Thyroid and parathyroid gland histology
Endocrine system anatomy and physiology
Thyroid hormones
Hyperthyroidism: Pathology review
Anatomy of the thyroid and parathyroid glands
Thyroid and parathyroid gland histology
Endocrine system anatomy and physiology
Thyroid hormones
Hypothyroidism: Pathology review
Introduction to the skeletal system
Bone remodeling and repair
Bone disorders: Pathology review
Anatomy of the abdominal viscera: Pancreas and spleen
Anatomy clinical correlates: Other abdominal organs
Pancreas histology
Pancreatic secretion
Pancreatitis: Pathology review
Anatomy of the diaphragm
Anatomy of the larynx and trachea
Anatomy of the lungs and tracheobronchial tree
Anatomy of the nose and paranasal sinuses
Anatomy of the pleura
Bones and joints of the thoracic wall
Muscles of the thoracic wall
Vessels and nerves of the thoracic wall
Anatomy clinical correlates: Pleura and lungs
Anatomy clinical correlates: Thoracic wall
Alveolar surface tension and surfactant
Anatomic and physiologic dead space
Breathing cycle and regulation
Gas exchange in the lungs, blood and tissues
Lung volumes and capacities
Pulmonary shunts
Regulation of pulmonary blood flow
Respiratory system anatomy and physiology
Ventilation
Ventilation-perfusion ratios and V/Q mismatch
Zones of pulmonary blood flow
Pneumonia: Pathology review
Drug misuse, intoxication and withdrawal: Alcohol: Pathology review
Drug misuse, intoxication and withdrawal: Hallucinogens: Pathology review
Drug misuse, intoxication and withdrawal: Other depressants: Pathology review
Drug misuse, intoxication and withdrawal: Stimulants: Pathology review
Atypical antidepressants
Nasal, oral and pharyngeal diseases: Pathology review
Anatomy of the abdominal viscera: Kidneys, ureters and suprarenal glands
Anatomy of the female urogenital triangle
Anatomy of the male urogenital triangle
Anatomy of the perineum
Anatomy of the urinary organs of the pelvis
Anatomy clinical correlates: Female pelvis and perineum
Anatomy clinical correlates: Male pelvis and perineum
Renal system anatomy and physiology
Urinary tract infections: Pathology review
Anatomy of the lungs and tracheobronchial tree
Fascia, vessels and nerves of the upper limb
Vessels and nerves of the forearm
Vessels and nerves of the gluteal region and posterior thigh
Anatomy clinical correlates: Pleura and lungs
Clot retraction and fibrinolysis
Coagulation (secondary hemostasis)
Platelet plug formation (primary hemostasis)
Deep vein thrombosis and pulmonary embolism: Pathology review
Anticoagulants: Direct factor inhibitors
Anticoagulants: Heparin
Anticoagulants: Warfarin

Clinical conditions

Abdominal quadrants, regions and planes
Anatomy of the abdominal viscera: Blood supply of the foregut, midgut and hindgut
Anatomy of the abdominal viscera: Esophagus and stomach
Anatomy of the abdominal viscera: Innervation of the abdominal viscera
Anatomy of the abdominal viscera: Large intestine
Anatomy of the abdominal viscera: Liver, biliary ducts and gallbladder
Anatomy of the abdominal viscera: Pancreas and spleen
Anatomy of the abdominal viscera: Small intestine
Anatomy of the anterolateral abdominal wall
Anatomy of the diaphragm
Anatomy of the gastrointestinal organs of the pelvis and perineum
Anatomy of the inguinal region
Anatomy of the muscles and nerves of the posterior abdominal wall
Anatomy of the peritoneum and peritoneal cavity
Anatomy of the vessels of the posterior abdominal wall
Anatomy clinical correlates: Anterior and posterior abdominal wall
Anatomy clinical correlates: Inguinal region
Anatomy clinical correlates: Other abdominal organs
Anatomy clinical correlates: Peritoneum and diaphragm
Anatomy clinical correlates: Viscera of the gastrointestinal tract
Appendicitis: Pathology review
Diverticular disease: Pathology review
Gallbladder disorders: Pathology review
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Inflammatory bowel disease: Pathology review
Pancreatitis: Pathology review
Acid-base map and compensatory mechanisms
Buffering and Henderson-Hasselbalch equation
Physiologic pH and buffers
The role of the kidney in acid-base balance
Acid-base disturbances: Pathology review
Anatomy of the abdominal viscera: Kidneys, ureters and suprarenal glands
Kidney histology
Renal system anatomy and physiology
Renal failure: Pathology review
Anatomy of the basal ganglia
Anatomy of the blood supply to the brain
Anatomy of the brainstem
Anatomy of the cerebellum
Anatomy of the cerebral cortex
Anatomy of the cranial meninges and dural venous sinuses
Anatomy of the diencephalon
Anatomy of the limbic system
Anatomy of the ventricular system
Anatomy of the white matter tracts
Anatomy clinical correlates: Anterior blood supply to the brain
Anatomy clinical correlates: Cerebellum and brainstem
Anatomy clinical correlates: Cerebral hemispheres
Anatomy clinical correlates: Posterior blood supply to the brain
Nervous system anatomy and physiology
Amnesia, dissociative disorders and delirium: Pathology review
Central nervous system infections: Pathology review
Cerebral vascular disease: Pathology review
Dementia: Pathology review
Drug misuse, intoxication and withdrawal: Alcohol: Pathology review
Drug misuse, intoxication and withdrawal: Hallucinogens: Pathology review
Drug misuse, intoxication and withdrawal: Other depressants: Pathology review
Drug misuse, intoxication and withdrawal: Stimulants: Pathology review
Mood disorders: Pathology review
Schizophrenia spectrum disorders: Pathology review
Seizures: Pathology review
Traumatic brain injury: Pathology review
Anticonvulsants and anxiolytics: Benzodiazepines
Atypical antipsychotics
Typical antipsychotics
Blood histology
Blood components
Erythropoietin
Extrinsic hemolytic normocytic anemia: Pathology review
Intrinsic hemolytic normocytic anemia: Pathology review
Macrocytic anemia: Pathology review
Microcytic anemia: Pathology review
Non-hemolytic normocytic anemia: Pathology review
Introduction to the central and peripheral nervous systems
Introduction to the muscular system
Introduction to the skeletal system
Introduction to the somatic and autonomic nervous systems
Anatomy of the ascending spinal cord pathways
Anatomy of the descending spinal cord pathways
Anatomy of the muscles and nerves of the posterior abdominal wall
Anatomy of the vertebral canal
Anatomy of the vessels of the posterior abdominal wall
Bones of the vertebral column
Joints of the vertebral column
Muscles of the back
Vessels and nerves of the vertebral column
Anatomy clinical correlates: Anterior and posterior abdominal wall
Anatomy clinical correlates: Bones, joints and muscles of the back
Anatomy clinical correlates: Spinal cord pathways
Anatomy clinical correlates: Vertebral canal
Back pain: Pathology review
Positive and negative predictive value
Sensitivity and specificity
Test precision and accuracy
Type I and type II errors
Anatomy of the breast
Anatomy of the coronary circulation
Anatomy of the heart
Anatomy of the inferior mediastinum
Anatomy of the lungs and tracheobronchial tree
Anatomy of the pleura
Anatomy of the superior mediastinum
Bones and joints of the thoracic wall
Muscles of the thoracic wall
Vessels and nerves of the thoracic wall
Anatomy clinical correlates: Breast
Anatomy clinical correlates: Heart
Anatomy clinical correlates: Mediastinum
Anatomy clinical correlates: Pleura and lungs
Anatomy clinical correlates: Thoracic wall
Cardiovascular system anatomy and physiology
Respiratory system anatomy and physiology
Aortic dissections and aneurysms: Pathology review
Coronary artery disease: Pathology review
Deep vein thrombosis and pulmonary embolism: Pathology review
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Pleural effusion, pneumothorax, hemothorax and atelectasis: Pathology review
Anatomy of the abdominal viscera: Esophagus and stomach
Anatomy of the abdominal viscera: Large intestine
Anatomy of the abdominal viscera: Small intestine
Anatomy of the gastrointestinal organs of the pelvis and perineum
Gastrointestinal system anatomy and physiology
Enteric nervous system
Colorectal polyps and cancer: Pathology review
Diverticular disease: Pathology review
Laxatives and cathartics
Anatomy of the diaphragm
Anatomy of the larynx and trachea
Anatomy of the lungs and tracheobronchial tree
Anatomy of the nose and paranasal sinuses
Anatomy of the pleura
Bones and joints of the thoracic wall
Muscles of the thoracic wall
Vessels and nerves of the thoracic wall
Anatomy clinical correlates: Pleura and lungs
Anatomy clinical correlates: Thoracic wall
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Lung cancer and mesothelioma: Pathology review
Nasal, oral and pharyngeal diseases: Pathology review
Obstructive lung diseases: Pathology review
Pneumonia: Pathology review
Restrictive lung diseases: Pathology review
Anatomy of the abdominal viscera: Large intestine
Anatomy of the abdominal viscera: Small intestine
Anatomy of the gastrointestinal organs of the pelvis and perineum
Bile secretion and enterohepatic circulation
Enteric nervous system
Gastrointestinal system anatomy and physiology
Inflammatory bowel disease: Pathology review
Malabsorption syndromes: Pathology review
Bacillus cereus (Food poisoning)
Campylobacter jejuni
Clostridium difficile (Pseudomembranous colitis)
Clostridium perfringens
Escherichia coli
Norovirus
Salmonella (non-typhoidal)
Shigella
Staphylococcus aureus
Vibrio cholerae (Cholera)
Yersinia enterocolitica
Anatomy of the heart
Anatomy of the lungs and tracheobronchial tree
Anatomy of the pleura
Anatomy clinical correlates: Heart
Anatomy clinical correlates: Mediastinum
Anatomy clinical correlates: Pleura and lungs
Anatomy clinical correlates: Thoracic wall
Alveolar surface tension and surfactant
Anatomic and physiologic dead space
Breathing cycle and regulation
Diffusion-limited and perfusion-limited gas exchange
Gas exchange in the lungs, blood and tissues
Pulmonary shunts
Regulation of pulmonary blood flow
Respiratory system anatomy and physiology
Ventilation
Ventilation-perfusion ratios and V/Q mismatch
Zones of pulmonary blood flow
Cardiac afterload
Cardiac contractility
Cardiac cycle
Cardiac preload
Cardiac work
Frank-Starling relationship
Measuring cardiac output (Fick principle)
Pressure-volume loops
Stroke volume, ejection fraction, and cardiac output
Acid-base map and compensatory mechanisms
Buffering and Henderson-Hasselbalch equation
Physiologic pH and buffers
The role of the kidney in acid-base balance
Apnea, hypoventilation and pulmonary hypertension: Pathology review
Deep vein thrombosis and pulmonary embolism: Pathology review
Heart failure: Pathology review
Lung cancer and mesothelioma: Pathology review
Obstructive lung diseases: Pathology review
Pleural effusion, pneumothorax, hemothorax and atelectasis: Pathology review
Pneumonia: Pathology review
Restrictive lung diseases: Pathology review
Tuberculosis: Pathology review
Introduction to the cardiovascular system
Introduction to the lymphatic system
Microcirculation and Starling forces
Cirrhosis: Pathology review
Deep vein thrombosis and pulmonary embolism: Pathology review
Heart failure: Pathology review
Hypothyroidism: Pathology review
Nephrotic syndromes: Pathology review
Renal failure: Pathology review
Antidiuretic hormone
Phosphate, calcium and magnesium homeostasis
Potassium homeostasis
Renin-angiotensin-aldosterone system
Sodium homeostasis
Diabetes insipidus and SIADH: Pathology review
Electrolyte disturbances: Pathology review
Parathyroid disorders and calcium imbalance: Pathology review
Anxiety disorders, phobias and stress-related disorders: Pathology Review
Apnea, hypoventilation and pulmonary hypertension: Pathology review
Mood disorders: Pathology review
Psychological sleep disorders: Pathology review
Adrenergic antagonists: Beta blockers
Anticonvulsants and anxiolytics: Barbiturates
Anticonvulsants and anxiolytics: Benzodiazepines
Antihistamines for allergies
Nonbenzodiazepine anticonvulsants
Opioid agonists, mixed agonist-antagonists and partial agonists
Tricyclic antidepressants
Cytokines
Inflammation
Anatomy of the abdominal viscera: Blood supply of the foregut, midgut and hindgut
Anatomy of the abdominal viscera: Esophagus and stomach
Anatomy of the abdominal viscera: Large intestine
Anatomy of the abdominal viscera: Small intestine
Anatomy of the gastrointestinal organs of the pelvis and perineum
Anatomy of the vessels of the posterior abdominal wall
Anatomy clinical correlates: Viscera of the gastrointestinal tract
Gastrointestinal bleeding: Pathology review
Anatomy of the blood supply to the brain
Anatomy of the cranial base
Anatomy of the cranial meninges and dural venous sinuses
Anatomy of the nose and paranasal sinuses
Anatomy of the suboccipital region
Anatomy of the temporomandibular joint and muscles of mastication
Anatomy of the trigeminal nerve (CN V)
Bones of the cranium
Bones of the neck
Deep structures of the neck: Prevertebral muscles
Muscles of the face and scalp
Nerves and vessels of the face and scalp
Superficial structures of the neck: Cervical plexus
Anatomy clinical correlates: Bones, fascia and muscles of the neck
Anatomy clinical correlates: Skull, face and scalp
Anatomy clinical correlates: Temporal regions, oral cavity and nose
Anatomy clinical correlates: Trigeminal nerve (CN V)
Anatomy clinical correlates: Vessels, nerves and lymphatics of the neck
Headaches: Pathology review
Anatomy of the abdominal viscera: Liver, biliary ducts and gallbladder
Anatomy of the abdominal viscera: Pancreas and spleen
Anatomy clinical correlates: Other abdominal organs
Gallbladder histology
Liver histology
Bile secretion and enterohepatic circulation
Liver anatomy and physiology
Pancreatic secretion
Jaundice: Pathology review
Anatomy of the elbow joint
Anatomy of the glenohumeral joint
Anatomy of the hip joint
Anatomy of the knee joint
Anatomy of the radioulnar joints
Anatomy of the sternoclavicular and acromioclavicular joints
Anatomy of the tibiofibular joints
Joints of the ankle and foot
Joints of the wrist and hand
Anatomy clinical correlates: Arm, elbow and forearm
Anatomy clinical correlates: Clavicle and shoulder
Anatomy clinical correlates: Knee
Anatomy clinical correlates: Leg and ankle
Anatomy clinical correlates: Wrist and hand
Gout and pseudogout: Pathology review
Rheumatoid arthritis and osteoarthritis: Pathology review
Seronegative and septic arthritis: Pathology review
Anatomy of the knee joint
Anatomy clinical correlates: Knee
Rheumatoid arthritis and osteoarthritis: Pathology review
Seronegative and septic arthritis: Pathology review
Candida
Clostridium difficile (Pseudomembranous colitis)
Enterobacter
Enterococcus
Escherichia coli
Proteus mirabilis
Pseudomonas aeruginosa
Staphylococcus aureus
Bacterial and viral skin infections: Pathology review
Skin histology
Skin anatomy and physiology
Acneiform skin disorders: Pathology review
Papulosquamous and inflammatory skin disorders: Pathology review
Pigmentation skin disorders: Pathology review
Skin cancer: Pathology review
Vesiculobullous and desquamating skin disorders: Pathology review
Anatomy of the heart
Anatomy of the vagus nerve (CN X)
Aortic dissections and aneurysms: Pathology review
Cardiomyopathies: Pathology review
Coronary artery disease: Pathology review
Heart blocks: Pathology review
Supraventricular arrhythmias: Pathology review
Valvular heart disease: Pathology review
Ventricular arrhythmias: Pathology review
Hunger and satiety
Anxiety disorders, phobias and stress-related disorders: Pathology Review
Breast cancer: Pathology review
Colorectal polyps and cancer: Pathology review
Dementia: Pathology review
Diabetes mellitus: Pathology review
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Heart failure: Pathology review
HIV and AIDS: Pathology review
Hyperthyroidism: Pathology review
Inflammatory bowel disease: Pathology review
Jaundice: Pathology review
Lung cancer and mesothelioma: Pathology review
Malabsorption syndromes: Pathology review
Mood disorders: Pathology review
Tuberculosis: Pathology review

Assessments

USMLE® Step 1 questions

0 / 1 complete

USMLE® Step 2 questions

0 / 1 complete

High Yield Notes

6 pages

Questions

USMLE® Step 1 style questions USMLE

0 of 1 complete

USMLE® Step 2 style questions USMLE

0 of 1 complete

A cardiologist is studying the effects of gender and the type of statin prescribed on patients' low-density lipoprotein (LDL) levels. In particular, the study will assess the effects of atorvastatin, rosuvastatin, and pravastatin. 50 male and 50 female participants will be assigned to take each type of statin for six months. A table illustrating the study design is as follows:  

Table 1: Number of participants in each study group

Male
Female
Atorvastatin
5050
Rosuvastatin
5050
Pravastatin
5050

Afterwards, the LDL level for each participant is recorded. Which of the following statistical analyses should be performed to analyze the results of this study?  

Transcript

Watch video only

Content Reviewers

Contributors

Analysis of variance, or simply, ANOVA, is a type of parametric statistical test used to determine if there’s a significant difference between the means or averages of three or more groups.

And significance is normally defined by a p-value of less than 0.05 or 5%.

Now when doing any parametric test, there are three key assumptions that we have to make about the population.

First, the sample population must have been recruited randomly. Choosing names randomly ensures that the people included in the study will have similar characteristics to the target population. This is important because that ensures that the results of the t-test can be applied to the target population - meaning it has good external validity!

The second assumption is that each individual in the sample was recruited independently from other individuals in the sample. In other words, no individuals influenced whether or not any other individual was included in the study.

For example, if two friends decided to get their blood pressures measured on the same day, and they were both included in the study, these two individuals would not be independent of each other and the second assumption would not be met.

Like random sampling, independent recruitment of individuals is important because it ensures that the sample population approximates the target population.

The third assumption is that the sample size is large enough to approximate the target population, which usually means having more than 20 people.

If it’s impossible to get a large sample size, then the sample population must follow a normal bell-shaped distribution for the characteristic being studied because that’s what we would expect to see in the target population.

Okay, now let’s say there are three medications available for lowering systolic blood pressure, and you want to figure out if any of the medications work differently than the others. Additionally, you want to figure out if the medications work differently for males and females.

So, let’s say that you find 6 people - 3 males and 3 females - who take Medication A for 6 weeks, and that afterwards the mean systolic blood pressure is 130 mmHg for males and 125 mmHg for females. Then, you find another 3 males and 3 females who have been taking Medication B - and afterwards their mean systolic blood pressure is 138 for males and 126 for females, and finally you find 3 males and 3 females who have been taking Medication C - and afterwards their systolic blood pressure is 132 for males and 125 for females.

We can arrange the numbers in a table like this, with sex on the top and medication type on the side, and each cell represents a mean systolic blood pressure value.

To figure out if medication type and sex have an effect on systolic blood pressure, we can use an ANOVA test.

Specifically, we would use a two-way ANOVA test, because we are testing two factors - medication type and sex - that each have multiple groups within them.

There are three groups in the medication factor - which are A, B, and C - and we’ll use two groups for sex - male and female.

A two-way ANOVA test has six hypotheses. The first three are null hypotheses.

The first null hypothesis says that there’s no difference in systolic blood pressure for people taking different medication types.

The second null hypothesis says that there is no difference in systolic blood pressure for males and females.

The third null hypothesis says that there is no interaction between medication type and sex.

Interaction means that one factor influences the relationship between the second factor and the outcome. So, in this example, interaction would mean that the effect of medication on systolic blood pressure is different for males and females.

The alternate hypotheses are the opposite of the null hypotheses.

The first one says that there is a difference in systolic blood pressure for people taking different medication types; the second one says that there is a difference in systolic blood pressure for males and females; and the third one says that there is an interaction between medication type and sex.

Now, there are seven steps to test these hypotheses.

The first step is to calculate the mean of each factor, so the mean for all the medication types and the mean for both sexes.

To find the overall row mean systolic blood pressure for the medication A group, we add up the mean blood pressures for both males and females in that group, and divide by 2. So, 130 plus 125, divided by 2, is 127.5. We can do the same thing for the medication B and C groups. So, 138 plus 126, divided by 2, is 132. And 132 plus 125, divided by 2, is 128.5.

Finally, we can find the grand mean - which is the mean blood pressure measurements for all the medication groups - by adding up each row mean and dividing by 3. So 127.5 plus 132 plus 128.5, divided by 3, gives us a grand mean of 129.

To find the overall column means for the second factor, we add up the mean blood pressures in each medication group and divide by 3. So for males, 130 plus 138 plus 132, divided by 3, is 133.3. And for females, 125 plus 126 plus 125, divided by 3, equals 125.3. Notice that if we add up the column means for both sexes and divide by 2, it equals 129, which is the grand mean.

The second step is to find the total sum of squares, which tells you how much variation there is in the dependent variables. In other words, it compares every single individual in the study to the grand mean.

If the total sum of squares is large, it means that the individuals in the study, at every time point, are very spread out from one another; and if the total sum of squares is small, it means that the individuals in the study, at every time point, are clustered together.

To get the sum of squares, we start by subtracting the grand mean from each individual’s systolic blood pressure measurement, and then squaring it, which is called the squared difference. Then, we add up all the squared differences to get the total sum of squares. There are 18 people in this study, so we will have 18 squared differences, but to save time, let’s just do the first three.

The first person in the study is a female who took Medication A, and her systolic blood pressure is 124. So, we subtract the grand mean, which is 129, from 124, which equals negative 5. Then we square it, so 5-squared is 25. The second person is also a female who took Medication A, and her blood pressure is 126. So, 126 minus 129 is negative 3, squared, is 9. For the third person, who is also a female that took Medication A, we do 125 minus 129, which is negative 4, and then square it, which is 16. So, if we add up all of the squared differences for everyone in the study, we get a total sum of squares of 743.

The third step is to find the between-group variation, which is also called the sum of squares-between, or the SSB.

The sum of squares-between is a measure of how similar each group’s mean is to the grand mean. And, since we have two factors, we have to find the sum of squares-between for each factor and them add them together to get the total sum of squares-between.

To get the sum of squares-between for the medication factor, we start by subtracting the grand mean from each group’s row mean and squaring it, to get the squared difference. Then, we multiply the squared difference by the number of people in that group.

So, let’s start with the medication factor. For medication 1, the row mean is 127.5. So, the squared difference is 127.5 minus 129, squared, which is 2.25. Then, since there are 6 people in the medication group, we multiply 2.25 by 6, which equals 13.5. We do that same thing for the other two medication groups - so, 132 minus 129, squared, times 6, is 54; and 128.5 minus 129, squared, times 6, is 1.5. When we add up all the squared differences for all the medications, we get 13.5 plus 54 plus 1.5, which equals 69.

We do a similar process to get the sum of squares-between for the sex factor, but this time we use the column means.

For males, we subtract the grand mean from the column mean, then square it. So, 133.3 minus 129 is 4.3, and 4.3-squared is 18.5. Then we multiply it by the number of males in the study, which is 9, so 18.5 times 9 is 166.5. For females, the equation is the same, but we substitute in their column mean, which is 125.3. So 125.3 minus 129, squared, times 9, is 123. And when we add up both the sum of squares-between for males and females we get 289.5.

The fourth step in the ANOVA calculation is to find the within-group variation, which is also called the sum of squares-within, or SSW.

The sum of squares-within is a measure of how similar each individual blood pressure measurement is from its own group mean.

The sum of squares-within is sometimes called the sum of squared-error, because it’s the variation in systolic blood pressure that can’t be explained by either the different medication or the different sex, so it’s sort of this unexplained error in the blood pressure measurement. Basically, it’s the variation caused by individual characteristics, like age or genetic differences.

To find the sum of squares-within, we divide the individual blood pressure measurements into two tables - one for males and one for females. Now, let’s work with the male table first. For the sum of squares-within, you start by finding the squared differences for each person in one group, and to do this, you take each individual blood pressure measurement and subtract that group’s mean - which is the row mean - and then square it. For example, let’s just take the first 3 systolic blood pressure, which are the measurements in the Medication A group. So, it’s 122, 136, and 133. Since the row mean for Medication A is 130, you subtract 130 from each individual measurement, so 122 minus 130 is negative 8, 136 minus 130 is 6, and 133 minus 130 is 3. Then you square each number and add them all together to get the squared difference. So, when you add up negative 8-squared, or 64, and 6-squared, or 36, and 3-squared, or 9, you get 109.

Summary

Two-way ANOVA (Analysis of Variance) is a statistical method used to determine whether there are significant differences between two or more groups of data. It involves testing for two or more factors, or variables, that may influence the outcome of an experiment or study.

Two-way ANOVA allows for the examination of the main effects of each factor, as well as any interaction between the factors. The method calculates an F-value, which is then compared to a critical value to determine statistical significance. Two-way ANOVA is commonly used in various research fields, including medicine, psychology, and social sciences, to analyze data and test hypotheses.