The P=NP problem

Download Report

Transcript The P=NP problem

Statistics
Entering numeric data
• On your iclicker.
• You will be told when a numeric input is
required
• Use the “up and down” arrow keys at the
top to increase or decrease the number.
• Use the “left and right” arrow keys to
move the cursor.
• Press “send” when you have entered the
desired answer.
Trial run
• Starting now, enter a number in your head
between 0 and 99.
• Press send when you are done.
Clicker question
• Enter your height to the nearest inch.
• For example if your height is 5’10” then
enter 5*12+10=70.
Clicker Q version 2
•
•
•
•
Enter which range your height falls in:
A) < 5’00” B)5’00-5’04”
C) 5’5”-5’10” D) 5’11”-6’3”
E) > 6’3”
What does the mean mean?
• Numbers x1 ,…, xN their mean value is
their sum divided by N
What is the mean height of an American
president?
• X: a president’s height. Its values are:
• 64,66,66,67,67,67,68,68,68,68,68.5,69,69,69.5,7
0,70,70,70,70.5,71,71,71,71,71.5,72,72,72,72,72
,72,72,72,73,73,74,74,74,74,74.5,74.5,75,76
• N=42
• Mean=(64+2x66+3x67+4x68+68.5+2x69+69.
5+5x70+70.5+4x71+71.5+8x72+2x73+4x74+2
x74.5+75+76)/42=70.69
Height
5ft4
President
James Madison
Height
5ft11
President
George W. Bush
Grover Cleveland
Herbert Hoover
Woodrow Wilson
5ft6
Benjamin Harrison
Martin Van Buren
5ft11.5
Richard Nixon
5ft7
John Quincy Adams
John Adams
William McKinley
6ft
James Buchanan
Gerald R. Ford
James Garfield
Warren Harding
John F. Kennedy
James Monroe
William H. Taft
John Tyler
5ft8
Ulysses S. Grant
William H. Harrison
James Polk
Zachary Taylor
6ft1
Andrew Jackson
Ronald Reagan
5ft8.5
Rutherford Hayes
6ft2
Chester Arthur
George Bush
Franklin D. Roosevelt
George Washington
5ft9
Millard Fillmore
Harry S. Truman
6ft2.5
Bill Clinton
Thomas Jefferson
5ft9.5
Jimmy Carter
6ft3
Lyndon B. Johnson
5ft10
Calvin Coolidge
Andrew Johnson
Franklin Pierce
Theodore Roosevelt
6ft4
Abraham Lincoln
5ft10.5
Dwight D. Eisenhower
Obama is 6'1
(73 inches)
and tied with
Andrew
Jackson and
Ronald
Reagan for
9th tallest
president.
What does the mean miss?
• Two random variables are correlated if an
increase in one corresponds to an increase in the
other.
• For example, tall people, on average, weigh
more.
• Average height of a human, on average, has
increased with time.
Histogram of president heights
President heights vs time
Other time-dependent
statistics: sex ratio
What does the median mean?
• Given numbers x1 ,…, xN their MEDIAN is
the number that is less than half the
numbers and greater than half the
numbers.
• If there is an even number of samples, the
mean is usually the average of the two
middle values.
• What is the median height for a U.S.
president?
Clicker question: what is the median
height of the 42 us presidents?
A
68
B
73
C
71
D
76
Household income in the United States
Mean and median household
incomes
• Compute the mean household income
based on the data above
• Compute the median based on the data
above.
Variance
• The variance of numbers x1 ,…, xN is the
sum of the squares of their differences
from their mean, divided by N-1.
• The sample deviation is the square root of
the variance.
Which olympian are you most
like?
Covariance
• Covariance is a measure of how much two
variables vary together.
Body mass index
Formula for BMI
• BMI=Mass (kg)/(Height(m))^2
• =(weight(lb)/(height (in)^2)*703
Clicker question
• What is your BMI (round to the nearest
whole number). Enter as numerical input.
The case of Jackie Jeschelnig
• Height: 5'9" (175 cm)
• Olympic Weight: 203 lbs (92 kg)
• BMI=92/(1.75)^2 =30.04
Are tall people smarter?
• How tall is Randy Newman?
why?
Other controversial
correlations: height and
intelligence and pay
•
•
•
•
•
Height and intelligence
Why are tall people smarter?
Height and income
Height, income and intelligence
Best revenge is living long
Health statistics
• The Centers for Disease Control web site
has a lot of data on various health
statistics for the U.S.
• Example: Is obesity a problem in the U.S.?
Exercises
• Compute the average height, average
weight, median height, median weight,
variance of the heights, and variance of
the weights from the following datatakn
from the following source
• Heights and weights data
Index
Height(Inches)
Weight(Pounds)
1
65.78
112.99
2
71.52
136.49
3
69.40
153.03
4
68.22
142.34
5
67.79
144.30
6
68.70
123.30
7
69.80
141.49
8
70.01
136.46
9
67.90
112.37
10
66.78
120.67
Exercise 2
• For each individual in the previous table,
compute the BMI of that individual.
Exercise 3
• For each of the Olympic athletes in the
following table taken from fatchic
compute the athlete’s BMI.
• What are the average heights and weights
for the athletes?
• What is the variance in heights and
weights of these athletes?
Name
Sport
Country
Height
Weight
Name
Sport
Country
Height
Weight
Khalil Mahmoud
K Abir
Abdelrahman
Weightlifting
Egypt
5 ft 4 in
165 lbs
Esmat Ahmed
Weightlifting
Egypt
5 ft 5 in
152 lbs
Marie-Eve
BeaucheminNadeau
Weightlifting
Canada
5 ft 5 in
152 lbs
Maria
Abakumova
Javelin Throw
Russian
Federation
5 ft 10 in
187 lbs
Neide Barbosa
Handball
Angola
5 ft 10 in
172 lbs
Marthe Koala
Women's 100 M
Hurdles
Burkina Faso
5 ft 9 in
150 lbs
Amanda
Bingson
Women's
Hammer Throw
USA
5 ft 5 in
201 lbs
Jillian
CamarenaWilliams
Women's Shot
Put
USA
5 ft 10 in
249 lbs
Nina Kamto
Njitam
Handball
France
5 ft 10 in
163 lbs
Delphine Reau
Shooting
France
5 ft 7 in
159 lbs