Logistic regression

3,787views

test

00:00 / 00:00

Logistic regression

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

Flashcards

0 / 8 complete

USMLE® Step 1 questions

0 / 1 complete

USMLE® Step 2 questions

0 / 1 complete

High Yield Notes

6 pages

Flashcards

Logistic regression

0 of 8 complete

Questions

USMLE® Step 1 style questions USMLE

0 of 1 complete

USMLE® Step 2 style questions USMLE

0 of 1 complete

A researcher is studying the effects of alcohol use on the risk of developing esophageal varices. As part of the study, 100 random participants are asked to report the number of alcoholic beverages they consume per day and whether they have been diagnosed with esophageal varices. Study participants consumed anywhere from 0 to 20 alcoholic beverages daily. A logistic regression is applied and the best fit trend curve is defined by the equation below. Which of the following conclusions can be most appropriately drawn from the study results?  

Transcript

Watch video only

Content Reviewers

Logistic regression is a type of statistical method that’s used to describe the relationship between an outcome variable and one or more exposure variables.

In logistic regression, the outcome variable is always categorical, and the exposure variables can be either categorical or quantitative.

For example, let’s say you want to figure out if smoking more cigarettes increases the chance of having a heart attack. In this case, the number of cigarettes is a quantitative exposure and whether or not a person has a heart attack is a categorical outcome.

Now, to figure this out, you might ask 200 people how many cigarettes they smoke in a day, and then follow that group of people for five years and see who has a heart attack and who doesn’t.

You could organize your data in a table like this—where the first column, or variable, is the number of cigarettes a person smokes, the second column is if they had a heart attack or not, and the rest of the columns are other characteristics, or variables, that you collected about each person, like their age, sex, and body mass index, or BMI.

Usually, for binary variables, like yes or no, we use the numbers zero and 1 to represent the two possible answers.

So, for the heart attack variable, we might say that zero represents “no” and 1 represents “yes”. We could do the same thing for sex, where zero represents females and 1 represents males.

Now, let’s just look at the first two variables, so how many cigarettes they smoke and if they had a heart attack or not. You could plot these measurements, or data points, on a scatterplot, with the number of cigarettes on the x-axis, and heart attack on the y-axis, and where each data point represents one individual.

This scatterplot might seem a little funny looking, and that’s because all of the data points are clustered on two points on the y-axis—they’re either on the zero, which represents no, or the 1, which represents yes.

This scatterplot can help us figure out how the odds of having a heart attack changes for people as they smoke more and more cigarettes.

And that’s the goal of logistic regression.

Now, in statistics, probability and odds are often confused with one another, so let’s break down the difference.

The probability is the number of times an outcome happened divided by the number of times the outcome could have happened, and it’s often represented by a capital P.

So, using our data, we could figure out the probability of having a heart attack for each number of cigarettes smoked per day.

Let’s say the range for the number of cigarettes smoked is between zero and 19, so we can break up the scatterplot up into 20 different sections - and it’s 20 sections instead of just 19 because zero is also a section.

Now, to find the probability of having a heart attack in a specific section, we count up the number of people who had heart attacks in that section and divide it by the total number of people in that section.

As an example, let’s say there are 10 people in the 15-cigarette section - or in other words, there are 10 people in the study that smoke 15 cigarettes per day - and of those 10 people, 6 people had heart attacks. So, the probability of having a heart attack for people that smoke 15 cigarettes per day is 6 over 10, or 60%.

Now let’s switch gears and talk about odds. Odds compare the probability of an outcome occurring with the probability of an outcome not occurring, so the equation for odds is P divided by 1 minus P.

So, in our example, we’d use the probability of having a heart attack - which is 60%, or 0.6 - compared with the probability of not having a heart attack, which is 1 minus 0.6, or 0.4. If we divide both sides by 0.4 we get 1.5 compared to 1.

To make it easier to interpret, let’s multiply both sides by two, so we get a 3 to 2 ratio. In other words, out of all the people that smoke 15 cigarettes per day, there are 3 people that have heart attacks for every 2 people that don’t have heart attacks.

Okay, coming back to the scatterplot... typically, in linear regression, a linear trend line is drawn to represent the pattern of data points on the plot, and that line is represented by the equation: y-hat equals b0 plus b1x1, where y-hat is the estimated value for the outcome variable; x1 is the value of the exposure variable; b0 represents the y-intercept; and b1 represents the slope of the line.

But in logistic regression, the trend line looks a bit different. That’s because the data points for logistic regression aren’t arranged in a straight line, so a linear trend line isn’t a good fit, or representation, of the data.

Instead, the trend line for logistic regression is curved, and specifically, it’s an S-shaped curve. And the equation for this S-shaped curve is P equals e, raised to the power of b0 plus b1x1, divided by 1 plus e, raised to the power of b0 plus b1x1.

At this point, you might be wondering what trend lines have to do with probability and odds.

Well, the slope of a line at a specific point represents a certain probability - so a data point on a very steep slope represents a high probability and a data point on a very shallow slope represents a low probability.

So with an S-shaped curve, the probability of an occurrence - which in this case, is the probability of having a heart attack - is different at various points along the line, which makes it pretty hard to interpret.

For example, toward the bottom of the line, the probability is low, then toward the middle of the line, the probability is higher, and then at the top of the line, the probability is low again.

And this is a problem because typically, we want to draw a line that represents the whole sample population, so that we can make conclusions about the whole sample population.

To fix this problem, we have to transform, or change, our data points so that they’re arranged on the plot in a more linear pattern. To do this, we have to change our data from looking at probability to looking at odds, and we actually have to go one step further and change them to the logarithm of odds, or the log-odds.

So, if the basic equation for odds is P over 1 minus P, then to change our probability equation to an odds equation, we do P over 1 minus P equals - e, raised to the power of b0 plus b1x1 - over - 1 minus e, raised to the power of b0 plus b1x1.

If you simplify this equation - which we won’t show here, just for simplicity’s sake - what you end up with is P over 1 minus P equals e, raised to the power of b0 plus b1x1. Okay, so that’s the odds equation.

And to change the odds equation to the log-odds, we just take the log of both sides. So, we end up with log of P over 1 minus P equals b0 plus b1x1.

This equation, as you might recognize, is the equation for a linear trend line. And, in fact, if we look at the newly transformed data, we’ll see that it’s now linearly arranged on the plot.

Whew! Sometimes the math can seem a little confusing, but luckily, statistical software does most of that work for us!

Basically, the software spits out values for b0 and b1, which we can then plug into our equation. For example, let’s say the software gives us a b0 of 0.05 and a b1 of 0.2, so the equation for the line would be y-hat equals 0.05 plus 0.2 times x1.

Summary

Logistic regression is a statistical method used to describe the relationship between an outcome variable and one or more exposure variables. Logistic regression can help to figure out the effect of an exposure variable (e.g. the number of cigarettes per day) on a categorical outcome variable (e.g. Having a heart attack). Note that the outcome variable is always categorical, but the exposure variables can be either categorical or quantitative.