SlideShare uma empresa Scribd logo
1 de 51
Quantitative
Methods
for
Lawyers
Bayes Theorem (Part 2),
Skewness, Kurtosis
& Data Distributions
Class #9
@ computational
computationallegalstudies.com
professor daniel martin katz danielmartinkatz.com
lexpredict.com slideshare.net/DanielKatz
Example:
Marie is getting married tomorrow, at an outdoor ceremony in the
desert.
In recent years, it has rained only 5 days each year.
Unfortunately, the weatherman has predicted rain for tomorrow.
When it actually rains, the weatherman correctly forecasts rain 90% of
the time.
When it doesn't rain, he incorrectly forecasts rain 10% of the time.
What is the probability that it will rain on the day of Marie's wedding?
Bayes Rule
Solution: The sample space is defined by two mutually-exclusive
events - it rains or it does not rain.
Additionally, a third event occurs when the weatherman predicts
rain. Notation for these events appears below.
• Event A1. It rains on Marie's wedding.
• Event A2. It does not rain on Marie's wedding
• Event B. The weatherman predicts rain.
Bayes Rule
• Event A1. It rains on Marie's wedding.
• Event A2. It does not rain on Marie's wedding
• Event B. The weatherman predicts rain.
In terms of probabilities, we know the following:
• P( A1 ) = 5/365 =0.014 [rains = 5 days per year]
• P( A2 ) = 360/365 = 0.986 [Not rain = 360 days per year]
• P( B | A1 ) = 0.9
[When it rains, the weatherman predicts rain 90% of the time]
• P( B | A2 ) = 0.1 [When it does not rain, the weatherman predicts
rain 10% of the time]
Bayes Rule
A2
P(B|A1)
360
365
B
B
Lets Think About This
Using a Diagram
A1
.1
=.986
.0986
P(B|A2)
.9
.0126
5
365
=.014
We want to know P( A1 | B ), the probability it will rain on the day of Marie's
wedding, given a forecast for rain by the weatherman. The answer can be
determined from Bayes' theorem, as shown below:
P( A1 | B ) =   _____________P( A1 ) P( B | A1 )_________
P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 )
P( A1 | B ) =
___________(0.014)(0.9)__________
[ (0.014)(0.9) + (0.1) (0.986) ]
P( A1 | B ) = .1133
Note the somewhat unintuitive result. Even when the weatherman predicts rain, it
only rains only about 11% of the time.
Bayes Rule
What Can We Say About The Weatherman?
Bayes Rule
Likelihood Increased from ~1% to ~11%
That is a 11 fold increase in the likelihood
However, it is still pretty unlikely to rain
Bayes Rule
How Much Signal / Information ?
We Could Consider a Complex Version of the problem -
Weatherman Predicts Rain + It is the Monsoon Season
Compound Events
The Signal was of limited value because ratio of Type I to
Type II error was not favorable
Lets Try Another
Bayes Rule Problem ...
Bayes Rule
Imagine a particular test:
correctly identifies those with a certain disease 94% of the time
and
correctly diagnoses those without the disease 98% of the time
A friend has just informed you that he has received a positive result
and asks for your advice about how to interpret these probabilities.
Before attempting to address your friend’s concern, you research
the illness and discover that 4% of men have this disease.
What is the probability your friend actually has the disease?
Define the events:
Express the given information and question in probability notation:
“test correctly identifies those with a certain serious disease 94% of the time”
“test correctly diagnoses those without the disease 98% of the time”
“you discover that 4% of men have this disease”
this statement also tells us that 96% of men do not have the disease
Bayes
Rule
( )1 0.94P B A⇒ = !
1
2
a man has this disease
a man does not have this disease
positive test result
negative test resultC
A
A
B
B
=
=
=
=
!
( )2 0.98C
P B A⇒ = !
( )1 0.04P A⇒ = !
( )2 0.96P A⇒ = !
Key Question:
“Given a positive result, What is the
probability your friend actually has
the disease ?”
( )1 ?P A B⇒ = !
Bayes Rule
a tree diagram:
!
1
2
a man has this disease
a man does not have this disease
positive test result
negative test resultC
A
A
B
B
=
=
=
=
!
Use Bayes’ Theorem and your tree diagram to answer the question:
There is a 66.2% probability that he actually has the disease. The probability is
high, but considerably lower than your friend feared.
Bayes Rule
( )
( ) ( )
( ) ( ) ( ) ( )
1 2
1
1 2 2 2
0.0376
0.662
0.0376 0.0192
P A P B A
P A B
P A P B A P A P B A
⋅
= = ≈
+⋅ + ⋅
!
http://www.agenarisk.com/resources/probability_puzzles/event_tree.shtml
Review This One on Your Own
Sampling
Take 2
Use the Sample to
Infer
Characteristics of
the Full Population
Why Sample?
Might Be Impossible to Get the Full Population
Cost of Getting Full Population
Sampling is concerned with the selection of a subset of
individuals from within a population to estimate
characteristics of the whole population
Sampling
Focus Upon Improving Precision v. Size
(1) Defining the population of concern
(2) Specifying a sampling frame, a set of items or events
possible to measure
(3) Specifying a sampling method for selecting items or
events from the frame
(4) Determining the sample size
(5) Implementing the sampling plan
(6) Sampling and data collecting
Sampling Stages
Determining the Sample Size
Conceptually We Understand that in order to
obtain a representative sample we need to acquire
somewhere between
1 > ? > Full Population
But Exactly How Many Observations do we need?
Random Sampling Error
Imagine a Political Poll
When You Sample at Random It is Possible to
Have a Skewed Set of Observation in the
Sample
where the population of interest are actual voters.
pollsters take smaller samples that are intended to be
representative, that is, a random sample of the population.
It is possible that pollsters sample 1,013 voters who happen to vote
for Bush when in fact the population is evenly split between
Candidate 1 and Candidate 2, but this is extremely unlikely
(p = 2−1013
≈ 1.1 × 10−305
) given that the sample is random.
Random Sampling Error
For Simple Random Sample on a large
population, the Inverse of the Square Root of
the Sample Size
Random Sampling Error
For Simple Random Sample on a large
population, the Inverse of the Square Root of
the Sample Size
Very
Typically
Reported
Random Sampling Error
a random sample of size 400 will give a margin of error, at a
95% confidence level, of 0.98/20 or 0.049 - just under 5%.
For Simple Random Sample on a large
population, the Inverse of the Square Root of
the Sample Size
Example:
Random Sampling Error
a random sample of size 400 will give a margin of error, at a
95% confidence level, of 0.98/20 or 0.049 - just under 5%.
a random sample of size 1600 will give a margin of error of
0.98/40, or 0.0245 - just under 2.5%.
For Simple Random Sample on a large
population, the Inverse of the Square Root of
the Sample Size
Example:
Random Sampling Error
a random sample of size 400 will give a margin of error, at a
95% confidence level, of 0.98/20 or 0.049 - just under 5%.
A random sample of size 1600 will give a margin of error of
0.98/40, or 0.0245 - just under 2.5%.
For Simple Random Sample on a large
population, the Inverse of the Square Root of
the Sample Size
Example:
Notice: Double the Precision Requires
four times the Sample Size!
Top portion of this graphic depicts the relative likelihood
that the "true" percentage is in a particular area given a
reported percentage of 50%.
In other words, for each sample
size, one is 95% confident that the
"true" percentage is in the region
indicated by the corresponding
segment.
The larger the sample is, the
smaller the margin of error.
The bottom portion shows
95% confidence intervals
(horizontal line segments),
the corresponding margins of
error (on the left), and sample
sizes (on the right).
Central Limit Theorem
Try this yourself: “Netlogo Central Limit Theorem”
http://ccl.northwestern.edu/netlogo/models/run.cgi?CentralLimitTheorem.715.627
Thinking of Data as
a Distribution: Histogram
Histogram - histogram is a graphical representation showing a
visual impression of the distribution of data
(1) consists of tabular frequencies, shown as adjacent
rectangles, erected over discrete intervals (bins)
(2) The height of a rectangle is also equal to the frequency
density of the interval, i.e., the frequency divided by the width
of the interval
(3) Total area of the histogram is equal to the number of data
Thinking of Data as
a Distribution: Histogram
Histogram of travel time, US 2000 census. Area under the curve equals
the total number of cases. This diagram uses Q/width from the table.
Ordinary v. Cumulative
Histogram
http://www.socr.ucla.edu/htmls/SOCR_Charts.html
http://www.socr.ucla.edu/
An Extra Online Resource
Data as a Distribution
Try to Start Thinking of Any Data Set as a Distribution
This allows you take a broader perspective about the
observations contained therein
When you get a new dataset you should generate some
summary statistics such as
(1) Measures of Central Tendency
(2) Measures of Variation
( including the first four moments of the distribution)
Thinking of Data as
a Distribution
Moment 1 = Mean
Moment 2 = Variance
Moment 3 = Skewness
Moment 4 = Kurtosis
Describing the Shape
of the Data
Skewness
skewness is a measure of the
asymmetry of a distribution
Skewness
Skewness in the Context of the Measures
of Central Tendency
a negative skew indicates that the tail on the left side
of the probability density function is longer than the
right side and the bulk of the values (possibly
including the median) lie to the right of the mean.
Skewness
Skewness
A positive skew indicates that the tail on the right side is
longer than the left side and the bulk of the values lie to
the left of the mean.
Calculating Skewness
1. Subtract Mean
from each Raw Score.
Aka, Deviations from
the mean
2. Raise each of these
deviations from the
mean to the third power
and sum. Aka: Sum of
third moment deviations
3. Calculate skewness, which is the sum of the deviations from the
mean, raised to the third power, divided by number of cases
minus 1, times the standard deviation raised to the third power.
Calculating Skewness
Try This Problem:
http://www.indiana.edu/~educy520/
sec5982/week_12/skewness_demo.pdf
1. Subtract Mean
from each Raw Score.
Aka, Deviations from
the mean
2. Raise each of these
deviations from the
mean to the third power
and sum. Aka: Sum of
third moment deviations
3. Calculate skewness, which is the sum of the
deviations from the mean, raised to the third
power, divided by number of cases minus 1,
times the standard deviation raised to the third
power.
Calculating Skewness
Try This Problem:
http://www.indiana.edu/~educy520/sec5982/week_12/skewness_demo.pdf
kurtosis is any measure of the "peakedness" of a
distribution
A high kurtosis distribution has a sharper peak
and longer, fatter tails, while a low kurtosis
distribution has a more rounded peak and
shorter, thinner tails.
Kurtosis
Distributions with zero excess kurtosis are called mesokurtic, or
mesokurtotic. The most prominent example of a mesokurtic
distribution is the normal distribution
A distribution with positive excess kurtosis is called leptokurtic, or
leptokurtotic. "Lepto-" means "slender". In terms of shape, a
leptokurtic distribution has a more acute peak around the mean and
fatter tails.
A distribution with negative excess kurtosis is called platykurtic, or
platykurtotic. "Platy-" means "broad". In terms of shape, a
platykurtic distribution has a lower, wider peak around the mean and
thinner tails.
Kurtosis
The moment coefficient of kurtosis of a data set is
computed almost the same way as the coefficient of
skewness:
and  
“excess” kurtosis: = Kurtosis − 3
Calculating Kurtosis
Note: the excess kurtosis is
generally used because the
excess kurtosis of a normal
distribution is 0.
Calculating Kurtosis
Example:
n = 100
x̄bar = 67.45
variance m2 = 8.5275 
Calculating Kurtosis
Example:
n = 100
x̄bar = 67.45
variance m2 = 8.5275 
kurtosis is = 199.3760/
(8.5275)² = 2.7418
and the excess kurtosis is =
2.7418 − 3 =
−0.2582
An Extra Online Resource
Calculating Skew & Kurtosis
http://www.youtube.com/watch?v=eKwJUWkD2FQ
Daniel Martin Katz
@ computational
computationallegalstudies.com
lexpredict.com
danielmartinkatz.com
illinois tech - chicago kent college of law@

Mais conteúdo relacionado

Mais procurados

Probability Concept and Bayes Theorem
Probability Concept and Bayes TheoremProbability Concept and Bayes Theorem
Probability Concept and Bayes Theorem
CherryBerry2
 
03+probability+distributions.ppt
03+probability+distributions.ppt03+probability+distributions.ppt
03+probability+distributions.ppt
abhinav3874
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
bmcfad01
 

Mais procurados (20)

Business statistics
Business statisticsBusiness statistics
Business statistics
 
Probability basics and bayes' theorem
Probability basics and bayes' theoremProbability basics and bayes' theorem
Probability basics and bayes' theorem
 
Quantitative Methods for Lawyers - Class #1 - Why Quantitative Methods + Res...
Quantitative Methods for Lawyers - Class #1 -  Why Quantitative Methods + Res...Quantitative Methods for Lawyers - Class #1 -  Why Quantitative Methods + Res...
Quantitative Methods for Lawyers - Class #1 - Why Quantitative Methods + Res...
 
Probability distribution
Probability distributionProbability distribution
Probability distribution
 
Bays theorem of probability
Bays theorem of probabilityBays theorem of probability
Bays theorem of probability
 
Stat topics
Stat topicsStat topics
Stat topics
 
Probability Concept and Bayes Theorem
Probability Concept and Bayes TheoremProbability Concept and Bayes Theorem
Probability Concept and Bayes Theorem
 
Introduction to probability distributions-Statistics and probability analysis
Introduction to probability distributions-Statistics and probability analysis Introduction to probability distributions-Statistics and probability analysis
Introduction to probability distributions-Statistics and probability analysis
 
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
 
Practice Test 2 Probability
Practice Test 2 ProbabilityPractice Test 2 Probability
Practice Test 2 Probability
 
Ppt for 1.1 introduction to statistical inference
Ppt for 1.1 introduction to statistical inferencePpt for 1.1 introduction to statistical inference
Ppt for 1.1 introduction to statistical inference
 
03+probability+distributions.ppt
03+probability+distributions.ppt03+probability+distributions.ppt
03+probability+distributions.ppt
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Probability distributions & expected values
Probability distributions & expected valuesProbability distributions & expected values
Probability distributions & expected values
 
Probability and Statistics
Probability and StatisticsProbability and Statistics
Probability and Statistics
 
Poisson probability distribution
Poisson probability distributionPoisson probability distribution
Poisson probability distribution
 
Calculating p value
Calculating p valueCalculating p value
Calculating p value
 
Les5e ppt 04
Les5e ppt 04Les5e ppt 04
Les5e ppt 04
 
Assessing Normality
Assessing NormalityAssessing Normality
Assessing Normality
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theorem
 

Semelhante a Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewness, Kurtosis & Data Distributions - Professor Daniel Martin Katz

Introduction to Statistics - Part 2
Introduction to Statistics - Part 2Introduction to Statistics - Part 2
Introduction to Statistics - Part 2
Damian T. Gordon
 
Confidence Intervals in the Life Sciences PresentationNamesS.docx
Confidence Intervals in the Life Sciences PresentationNamesS.docxConfidence Intervals in the Life Sciences PresentationNamesS.docx
Confidence Intervals in the Life Sciences PresentationNamesS.docx
maxinesmith73660
 
Findings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport WritingFindings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport Writing
ShainaBoling829
 

Semelhante a Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewness, Kurtosis & Data Distributions - Professor Daniel Martin Katz (20)

Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Introduction to Statistics - Part 2
Introduction to Statistics - Part 2Introduction to Statistics - Part 2
Introduction to Statistics - Part 2
 
Statistics excellent
Statistics excellentStatistics excellent
Statistics excellent
 
2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Chapter_9.pptx
Chapter_9.pptxChapter_9.pptx
Chapter_9.pptx
 
Normal and standard normal distribution
Normal and standard normal distributionNormal and standard normal distribution
Normal and standard normal distribution
 
Descriptive Statistics
Descriptive StatisticsDescriptive Statistics
Descriptive Statistics
 
Basic Statistics for application in Medical Assessment
Basic Statistics for application in Medical AssessmentBasic Statistics for application in Medical Assessment
Basic Statistics for application in Medical Assessment
 
Statistics Homework Help
Statistics Homework HelpStatistics Homework Help
Statistics Homework Help
 
Module-2_Notes-with-Example for data science
Module-2_Notes-with-Example for data scienceModule-2_Notes-with-Example for data science
Module-2_Notes-with-Example for data science
 
Frequency.pptx
Frequency.pptxFrequency.pptx
Frequency.pptx
 
Confidence Intervals in the Life Sciences PresentationNamesS.docx
Confidence Intervals in the Life Sciences PresentationNamesS.docxConfidence Intervals in the Life Sciences PresentationNamesS.docx
Confidence Intervals in the Life Sciences PresentationNamesS.docx
 
Lecture-3 inferential stastistics.ppt
Lecture-3 inferential stastistics.pptLecture-3 inferential stastistics.ppt
Lecture-3 inferential stastistics.ppt
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Chapter 6 part1- Introduction to Inference-Estimating with Confidence (Introd...
Chapter 6 part1- Introduction to Inference-Estimating with Confidence (Introd...Chapter 6 part1- Introduction to Inference-Estimating with Confidence (Introd...
Chapter 6 part1- Introduction to Inference-Estimating with Confidence (Introd...
 
Math Stats Probability
Math Stats ProbabilityMath Stats Probability
Math Stats Probability
 
Findings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport WritingFindings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport Writing
 
Different types of distributions
Different types of distributionsDifferent types of distributions
Different types of distributions
 

Mais de Daniel Katz

Mais de Daniel Katz (20)

Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
 
Can Law Librarians Help Law Become More Data Driven ? An Open Question in Ne...
Can Law Librarians Help Law Become More Data Driven ?  An Open Question in Ne...Can Law Librarians Help Law Become More Data Driven ?  An Open Question in Ne...
Can Law Librarians Help Law Become More Data Driven ? An Open Question in Ne...
 
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
 
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
 
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
 
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
 
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
 
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
 
Artificial Intelligence and Law - 
A Primer
Artificial Intelligence and Law - 
A Primer Artificial Intelligence and Law - 
A Primer
Artificial Intelligence and Law - 
A Primer
 
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
 
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
 
LexPredict - Empowering the Future of Legal Decision Making
LexPredict - Empowering the Future of Legal Decision MakingLexPredict - Empowering the Future of Legal Decision Making
LexPredict - Empowering the Future of Legal Decision Making
 
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
 
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
 
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
 
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
 
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
 
Legal Analytics Course - Class 9 - Clustering Algorithms (K-Means & Hierarch...
Legal Analytics Course - Class 9 -  Clustering Algorithms (K-Means & Hierarch...Legal Analytics Course - Class 9 -  Clustering Algorithms (K-Means & Hierarch...
Legal Analytics Course - Class 9 - Clustering Algorithms (K-Means & Hierarch...
 
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
 
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewness, Kurtosis & Data Distributions - Professor Daniel Martin Katz

  • 1. Quantitative Methods for Lawyers Bayes Theorem (Part 2), Skewness, Kurtosis & Data Distributions Class #9 @ computational computationallegalstudies.com professor daniel martin katz danielmartinkatz.com lexpredict.com slideshare.net/DanielKatz
  • 2. Example: Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Marie's wedding? Bayes Rule
  • 3. Solution: The sample space is defined by two mutually-exclusive events - it rains or it does not rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these events appears below. • Event A1. It rains on Marie's wedding. • Event A2. It does not rain on Marie's wedding • Event B. The weatherman predicts rain. Bayes Rule
  • 4. • Event A1. It rains on Marie's wedding. • Event A2. It does not rain on Marie's wedding • Event B. The weatherman predicts rain. In terms of probabilities, we know the following: • P( A1 ) = 5/365 =0.014 [rains = 5 days per year] • P( A2 ) = 360/365 = 0.986 [Not rain = 360 days per year] • P( B | A1 ) = 0.9 [When it rains, the weatherman predicts rain 90% of the time] • P( B | A2 ) = 0.1 [When it does not rain, the weatherman predicts rain 10% of the time] Bayes Rule
  • 5. A2 P(B|A1) 360 365 B B Lets Think About This Using a Diagram A1 .1 =.986 .0986 P(B|A2) .9 .0126 5 365 =.014
  • 6. We want to know P( A1 | B ), the probability it will rain on the day of Marie's wedding, given a forecast for rain by the weatherman. The answer can be determined from Bayes' theorem, as shown below: P( A1 | B ) =   _____________P( A1 ) P( B | A1 )_________ P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 ) P( A1 | B ) = ___________(0.014)(0.9)__________ [ (0.014)(0.9) + (0.1) (0.986) ] P( A1 | B ) = .1133 Note the somewhat unintuitive result. Even when the weatherman predicts rain, it only rains only about 11% of the time. Bayes Rule
  • 7. What Can We Say About The Weatherman? Bayes Rule Likelihood Increased from ~1% to ~11% That is a 11 fold increase in the likelihood However, it is still pretty unlikely to rain
  • 8. Bayes Rule How Much Signal / Information ? We Could Consider a Complex Version of the problem - Weatherman Predicts Rain + It is the Monsoon Season Compound Events The Signal was of limited value because ratio of Type I to Type II error was not favorable
  • 9. Lets Try Another Bayes Rule Problem ...
  • 10. Bayes Rule Imagine a particular test: correctly identifies those with a certain disease 94% of the time and correctly diagnoses those without the disease 98% of the time A friend has just informed you that he has received a positive result and asks for your advice about how to interpret these probabilities. Before attempting to address your friend’s concern, you research the illness and discover that 4% of men have this disease. What is the probability your friend actually has the disease?
  • 11. Define the events: Express the given information and question in probability notation: “test correctly identifies those with a certain serious disease 94% of the time” “test correctly diagnoses those without the disease 98% of the time” “you discover that 4% of men have this disease” this statement also tells us that 96% of men do not have the disease Bayes Rule ( )1 0.94P B A⇒ = ! 1 2 a man has this disease a man does not have this disease positive test result negative test resultC A A B B = = = = ! ( )2 0.98C P B A⇒ = ! ( )1 0.04P A⇒ = ! ( )2 0.96P A⇒ = !
  • 12. Key Question: “Given a positive result, What is the probability your friend actually has the disease ?” ( )1 ?P A B⇒ = !
  • 13. Bayes Rule a tree diagram: ! 1 2 a man has this disease a man does not have this disease positive test result negative test resultC A A B B = = = = !
  • 14. Use Bayes’ Theorem and your tree diagram to answer the question: There is a 66.2% probability that he actually has the disease. The probability is high, but considerably lower than your friend feared. Bayes Rule ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 2 1 1 2 2 2 0.0376 0.662 0.0376 0.0192 P A P B A P A B P A P B A P A P B A ⋅ = = ≈ +⋅ + ⋅ !
  • 16.
  • 17. Sampling Take 2 Use the Sample to Infer Characteristics of the Full Population
  • 18. Why Sample? Might Be Impossible to Get the Full Population Cost of Getting Full Population Sampling is concerned with the selection of a subset of individuals from within a population to estimate characteristics of the whole population Sampling Focus Upon Improving Precision v. Size
  • 19. (1) Defining the population of concern (2) Specifying a sampling frame, a set of items or events possible to measure (3) Specifying a sampling method for selecting items or events from the frame (4) Determining the sample size (5) Implementing the sampling plan (6) Sampling and data collecting Sampling Stages
  • 20. Determining the Sample Size Conceptually We Understand that in order to obtain a representative sample we need to acquire somewhere between 1 > ? > Full Population But Exactly How Many Observations do we need?
  • 21. Random Sampling Error Imagine a Political Poll When You Sample at Random It is Possible to Have a Skewed Set of Observation in the Sample where the population of interest are actual voters. pollsters take smaller samples that are intended to be representative, that is, a random sample of the population. It is possible that pollsters sample 1,013 voters who happen to vote for Bush when in fact the population is evenly split between Candidate 1 and Candidate 2, but this is extremely unlikely (p = 2−1013 ≈ 1.1 × 10−305 ) given that the sample is random.
  • 22. Random Sampling Error For Simple Random Sample on a large population, the Inverse of the Square Root of the Sample Size
  • 23. Random Sampling Error For Simple Random Sample on a large population, the Inverse of the Square Root of the Sample Size Very Typically Reported
  • 24. Random Sampling Error a random sample of size 400 will give a margin of error, at a 95% confidence level, of 0.98/20 or 0.049 - just under 5%. For Simple Random Sample on a large population, the Inverse of the Square Root of the Sample Size Example:
  • 25. Random Sampling Error a random sample of size 400 will give a margin of error, at a 95% confidence level, of 0.98/20 or 0.049 - just under 5%. a random sample of size 1600 will give a margin of error of 0.98/40, or 0.0245 - just under 2.5%. For Simple Random Sample on a large population, the Inverse of the Square Root of the Sample Size Example:
  • 26. Random Sampling Error a random sample of size 400 will give a margin of error, at a 95% confidence level, of 0.98/20 or 0.049 - just under 5%. A random sample of size 1600 will give a margin of error of 0.98/40, or 0.0245 - just under 2.5%. For Simple Random Sample on a large population, the Inverse of the Square Root of the Sample Size Example: Notice: Double the Precision Requires four times the Sample Size!
  • 27. Top portion of this graphic depicts the relative likelihood that the "true" percentage is in a particular area given a reported percentage of 50%. In other words, for each sample size, one is 95% confident that the "true" percentage is in the region indicated by the corresponding segment. The larger the sample is, the smaller the margin of error. The bottom portion shows 95% confidence intervals (horizontal line segments), the corresponding margins of error (on the left), and sample sizes (on the right).
  • 28. Central Limit Theorem Try this yourself: “Netlogo Central Limit Theorem” http://ccl.northwestern.edu/netlogo/models/run.cgi?CentralLimitTheorem.715.627
  • 29. Thinking of Data as a Distribution: Histogram Histogram - histogram is a graphical representation showing a visual impression of the distribution of data (1) consists of tabular frequencies, shown as adjacent rectangles, erected over discrete intervals (bins) (2) The height of a rectangle is also equal to the frequency density of the interval, i.e., the frequency divided by the width of the interval (3) Total area of the histogram is equal to the number of data
  • 30. Thinking of Data as a Distribution: Histogram Histogram of travel time, US 2000 census. Area under the curve equals the total number of cases. This diagram uses Q/width from the table.
  • 33. Data as a Distribution Try to Start Thinking of Any Data Set as a Distribution This allows you take a broader perspective about the observations contained therein When you get a new dataset you should generate some summary statistics such as (1) Measures of Central Tendency (2) Measures of Variation ( including the first four moments of the distribution)
  • 34. Thinking of Data as a Distribution Moment 1 = Mean Moment 2 = Variance Moment 3 = Skewness Moment 4 = Kurtosis
  • 36. Skewness skewness is a measure of the asymmetry of a distribution
  • 37. Skewness Skewness in the Context of the Measures of Central Tendency
  • 38. a negative skew indicates that the tail on the left side of the probability density function is longer than the right side and the bulk of the values (possibly including the median) lie to the right of the mean. Skewness
  • 39. Skewness A positive skew indicates that the tail on the right side is longer than the left side and the bulk of the values lie to the left of the mean.
  • 40. Calculating Skewness 1. Subtract Mean from each Raw Score. Aka, Deviations from the mean 2. Raise each of these deviations from the mean to the third power and sum. Aka: Sum of third moment deviations 3. Calculate skewness, which is the sum of the deviations from the mean, raised to the third power, divided by number of cases minus 1, times the standard deviation raised to the third power.
  • 41. Calculating Skewness Try This Problem: http://www.indiana.edu/~educy520/ sec5982/week_12/skewness_demo.pdf 1. Subtract Mean from each Raw Score. Aka, Deviations from the mean 2. Raise each of these deviations from the mean to the third power and sum. Aka: Sum of third moment deviations 3. Calculate skewness, which is the sum of the deviations from the mean, raised to the third power, divided by number of cases minus 1, times the standard deviation raised to the third power.
  • 42. Calculating Skewness Try This Problem: http://www.indiana.edu/~educy520/sec5982/week_12/skewness_demo.pdf
  • 43.
  • 44. kurtosis is any measure of the "peakedness" of a distribution A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter, thinner tails. Kurtosis
  • 45. Distributions with zero excess kurtosis are called mesokurtic, or mesokurtotic. The most prominent example of a mesokurtic distribution is the normal distribution A distribution with positive excess kurtosis is called leptokurtic, or leptokurtotic. "Lepto-" means "slender". In terms of shape, a leptokurtic distribution has a more acute peak around the mean and fatter tails. A distribution with negative excess kurtosis is called platykurtic, or platykurtotic. "Platy-" means "broad". In terms of shape, a platykurtic distribution has a lower, wider peak around the mean and thinner tails. Kurtosis
  • 46. The moment coefficient of kurtosis of a data set is computed almost the same way as the coefficient of skewness: and   “excess” kurtosis: = Kurtosis − 3 Calculating Kurtosis Note: the excess kurtosis is generally used because the excess kurtosis of a normal distribution is 0.
  • 48. Calculating Kurtosis Example: n = 100 x̄bar = 67.45 variance m2 = 8.5275  kurtosis is = 199.3760/ (8.5275)² = 2.7418 and the excess kurtosis is = 2.7418 − 3 = −0.2582
  • 49. An Extra Online Resource
  • 50. Calculating Skew & Kurtosis http://www.youtube.com/watch?v=eKwJUWkD2FQ
  • 51. Daniel Martin Katz @ computational computationallegalstudies.com lexpredict.com danielmartinkatz.com illinois tech - chicago kent college of law@