Download presentation
Presentation is loading. Please wait.
Published byLester Wright Modified over 9 years ago
1
Last Time Hypothesis Testing –Yes – No Questions –Assess with p-value P[what saw or m.c. | Boundary] –Interpretation –Small is conclusive –1-sided vs. 2-sided
2
Administrative Matters Midterm I, coming Tuesday, Feb. 24
3
Administrative Matters Midterm I, coming Tuesday, Feb. 24 Numerical answers: –No computers, no calculators –Handwrite Excel formulas (e.g. =9+4^2) –Don’t do arithmetic (e.g. use such formulas)
4
Administrative Matters Midterm I, coming Tuesday, Feb. 24 Numerical answers: –No computers, no calculators –Handwrite Excel formulas (e.g. =9+4^2) –Don’t do arithmetic (e.g. use such formulas) Bring with you: –8.5 x 11 inch sheet of paper –With your favorite info (formulas, Excel, etc.)
5
Administrative Matters Midterm I, coming Tuesday, Feb. 24 Numerical answers: –No computers, no calculators –Handwrite Excel formulas (e.g. =9+4^2) –Don’t do arithmetic (e.g. use such formulas) Bring with you: –8.5 x 11 inch sheet of paper –With your favorite info (formulas, Excel, etc.) Course in Concepts, not Memorization
6
Administrative Matters State of BlackBoard Discussion Board Generally happy with result
7
Administrative Matters State of BlackBoard Discussion Board Generally happy with result But think carefully about “where to post” –Look at current Thread HW 4 –Note “diffusion of questions” –Hard to find what you want
8
Administrative Matters State of BlackBoard Discussion Board Generally happy with result But think carefully about “where to post” –Look at current Thread HW 4 –Note “diffusion of questions” –Hard to find what you want Suggest keep HW problems all together –i.e. One “Root node” per HW problem
9
Administrative Matters State of BlackBoard Discussion Board Suggest keep HW problems all together –i.e. One “Root node” per HW problem
10
Administrative Matters State of BlackBoard Discussion Board Suggest keep HW problems all together –i.e. One “Root node” per HW problem Choose where to post (in tree) carefully
11
Administrative Matters State of BlackBoard Discussion Board Suggest keep HW problems all together –i.e. One “Root node” per HW problem Choose where to post (in tree) carefully Use better “Subject Lines” –Not just dumb “Replies” –You can enter anything you want –Try to make it clear to readers… –Especially when “not following current line”
12
Reading In Textbook Approximate Reading for Today’s Material: Pages 261-262, 9-14 Approximate Reading for Next Class: 270-276, 30-34
13
Hypothesis Testing In General: p-value = P[what was seen, or more conclusive | at boundary between H 0 & H 1 ] Caution: more conclusive requires careful interpretation
14
Hypothesis Testing Caution: more conclusive requires careful interpretation Reason: Need to decide between 1 - sided Hypotheses, like H 0 : p < vs. H 1 : p ≥ And 2 - sided Hypotheses, like H 0 : p = vs. H 1 : p ≠
15
Hypothesis Testing e.g. a slot machine bears a sign which says “Win 30% of the time” In 10 plays, I don’t win any. Can I conclude sign is false? (& thus have grounds for complaint, or is this a reasonable occurrence?)
16
Hypothesis Testing e.g. a slot machine bears a sign which says “Win 30% of the time” In 10 plays, I don’t win any. Conclude false? Let p = P[win], let X = # wins in 10 plays Model: X ~ Bi(10, p) Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3
17
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3]
18
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3] (understand this by visualizing # line)
19
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3] 0 1 2 3 4 5 6
20
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3] 0 1 2 3 4 5 6 30% of 10, most likely when p = 0.3 i.e. least conclusive
21
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3] 0 1 2 3 4 5 6 so more conclusive includes
22
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = P[X = 0 or more conclusive | p = 0.3] 0 1 2 3 4 5 6 so more conclusive includes but since 2-sided, also include
23
Hypothesis Testing Generally how to calculate? 0 1 2 3 4 5 6
24
Hypothesis Testing Generally how to calculate? Observed Value 0 1 2 3 4 5 6
25
Hypothesis Testing Generally how to calculate? Observed Value Most Likely Value 0 1 2 3 4 5 6
26
Hypothesis Testing Generally how to calculate? Observed Value Most Likely Value 0 1 2 3 4 5 6 # spaces = 3
27
Hypothesis Testing Generally how to calculate? Observed Value Most Likely Value 0 1 2 3 4 5 6 # spaces = 3 so go 3 spaces in other direct’n
28
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 0 1 2 3 4 5 6
29
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 p-value = P[X = 0 or more conclusive | p = 0.3]
30
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 p-value = P[X = 0 or more conclusive | p = 0.3] = P[X ≤ 0 or X ≥ 6 | p = 0.3]
31
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 p-value = P[X = 0 or more conclusive | p = 0.3] = P[X ≤ 0 or X ≥ 6 | p = 0.3] = P[X ≤ 0] + (1 – P[X ≤ 5])
32
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 p-value = P[X = 0 or more conclusive | p = 0.3] = P[X ≤ 0 or X ≥ 6 | p = 0.3] = P[X ≤ 0] + (1 – P[X ≤ 5]) = 0.076
33
Hypothesis Testing Result: More conclusive means X ≤ 0 or X ≥ 6 p-value = P[X = 0 or more conclusive | p = 0.3] = P[X ≤ 0 or X ≥ 6 | p = 0.3] = P[X ≤ 0] + (1 – P[X ≤ 5]) = 0.076 Excel result from: http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg4.xls
34
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = 0.076
35
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = 0.076 Yes-No Conclusion: 0.076 > 0.05, so not safe to conclude “P[win] = 0.3” sign is wrong, at level 0.05
36
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = 0.076 Yes-No Conclusion: 0.076 > 0.05, so not safe to conclude “P[win] = 0.3” sign is wrong, at level 0.05 (10 straight losses is reasonably likely)
37
Hypothesis Testing Test: H 0 : p = 0.3 vs. H 1 : p ≠ 0.3 p-value = 0.076 Yes-No Conclusion: 0.076 > 0.05, so not safe to conclude “P[win] = 0.3” sign is wrong, at level 0.05 Gray Level Conclusion: in “fuzzy zone”, some evidence, but not too strong
38
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ???
39
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Seems like same question?
40
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Seems like same question? Careful, “≠” became “<”
41
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Seems like same question? Careful, “≠” became “<” I.e. 2-sided hypo became 1-sided hypo
42
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Seems like same question? Careful, “≠” became “<” I.e. 2-sided hypo became 1-sided hypo Difference can have major impact
43
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ???
44
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3
45
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3]
46
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3] same boundary between H 0 & H 1
47
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3]
48
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3] = P[ X ≤ 0 | p = 0.3]
49
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3] = P[ X ≤ 0 | p = 0.3] = 0.028
50
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? Test: H 0 : p ≥ 0.3 vs. H 1 : p < 0.3 p-value = P[ X = 0 or m. c. | p = 0.3] = P[ X ≤ 0 | p = 0.3] = 0.028 Excel result from: http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg4.xls
51
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028
52
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028 Yes-No: Now can conclude P[win] < 30%
53
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach:
54
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach: Have strong evidence that P[win] < 30%
55
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach: Have strong evidence that P[win] < 30% But cannot conclude P[win] diff’t from 30%
56
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach: Have strong evidence that P[win] < 30% But cannot conclude P[win] diff’t from 30% Different from Common Sense
57
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach: Have strong evidence that P[win] < 30% But cannot conclude P[win] diff’t from 30% Different from Common Sense I.e. “logic of statistical significance” different from“ordinary logic”
58
Hypothesis Testing Yes-No: Now can conclude P[win] < 30% Paradox of Yes-No Approach: Have strong evidence that P[win] < 30% But cannot conclude P[win] diff’t from 30% Different from Common Sense I.e. “logic - stat. sig.” not “ordinary logic” Reason: for 2-sided, uncertainty comes from both sides, just adds to gray level
59
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028 Yes-No: Now can conclude P[win] < 30% Gray Level: Evidence still flaky, but stronger
60
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028 Yes-No: Now can conclude P[win] < 30% Gray Level: Evidence still flaky, but stronger Note: No gray level paradox
61
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028 Yes-No: Now can conclude P[win] < 30% Gray Level: Evidence still flaky, but stronger Note: No gray level paradox Since no cutoff, just “somewhat stronger…”
62
Hypothesis Testing Alternate Question: Same setup, can we conclude: P[win] < 30% ??? p-value = 0.028 Yes-No: Now can conclude P[win] < 30% Gray Level: Evidence still flaky, but stronger Note: No gray level paradox Since no cutoff, just “somewhat stronger…” This is why I recommend gray level
63
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation
64
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation (strongly affects answer)
65
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation (strongly affects answer) 2.Careful Interpretation
66
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation (strongly affects answer) 2.Careful Interpretation (notion of “P[win]≠30%” being tested is different from usual)
67
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation 2.Careful Interpretation But not so bad with Gray Level interpretation
68
Hypothesis Testing Lessons: 1-sided vs. 2-sided issues need: 1.Careful Implementation 2.Careful Interpretation But not so bad with Gray Level interpretation: “very strong” p-val < 0.01 “marginal” – “flaky” 0.01 ≤ p-val ≤ 0.1 “very weak” 0.1 < p-val
69
Hypothesis Testing HW C14: Answer from both gray-level and yes-no viewpoints: (c)A TV ad claims that 30% of people prefer Brand X. Should we dispute this claim if a random sample of 10 people show: (i)2 people who prefer Brand X (p-val = 0.733) (ii)3 people who prefer Brand X (p-val = 1) (iii)6 people who prefer Brand X (p-val = 0.076) (iv)10 people who prefer Brand X (p-val = 5.9e-6)
70
Hypothesis Testing HW C14: Answer from both gray-level and yes-no viewpoints: (d)A manager asks 12 workers, of whom 7 say they are satisfied with working conditions. Does this contradict the CEO’s claim that ¾ of the workers are satisfied? (p-val = 0.316)
71
Hypothesis Testing HW: 8.22a, ignore “z statistic” (p-val = 0.006) 8.29a, ignore “sketch …” (p-val = 0.184)
72
And now for something completely different Coin tossing & die rolling
73
And now for something completely different Coin tossing & die rolling: Useful thought models in this course
74
And now for something completely different Coin tossing & die rolling: Useful thought models in this course We’ve calculated various probabilities
75
And now for something completely different Coin tossing & die rolling: Useful thought models in this course We’ve calculated various probabilities Model for “randomness”…
76
And now for something completely different Coin tossing & die rolling: Useful thought models in this course We’ve calculated various probabilities Model for “randomness”… But how random are they really?
77
And now for something completely different Randomness in coin tossing
78
And now for something completely different Randomness in coin tossing: Excellent source Prof. Persi Diaconis (Stanford U.)
79
And now for something completely different Randomness in coin tossing: Excellent source Prof. Persi Diaconis (Stanford U.) http://www-stat.stanford.edu/~cgates/PERSI/
80
And now for something completely different Randomness in coin tossing
81
And now for something completely different Randomness in coin tossing: Prof. Persi Diaconis (Stanford U.) Trained as performing magician
82
And now for something completely different Randomness in coin tossing: Prof. Persi Diaconis (Stanford U.) Trained as performing magician Legendary Trick: –He tosses coin, you call it, he catches it!
83
And now for something completely different Randomness in coin tossing: Prof. Persi Diaconis (Stanford U.) Trained as performing magician Legendary Trick: –He tosses coin, you call it, he catches it! Coin tosses not really random
84
And now for something completely different Randomness in die rolling?
85
Big Picture Hypothesis Testing (Given dist’n, answer “yes-no”)
86
Big Picture Hypothesis Testing (Given dist’n, answer “yes-no”) Can solve using BINOMDIST
87
Big Picture Hypothesis Testing (Given dist’n, answer “yes-no”) Margin of Error (Find dist’n, use to measure error)
88
Big Picture Hypothesis Testing (Given dist’n, answer “yes-no”) Margin of Error (Find dist’n, use to measure error) Choose Sample Size (for given amount of error)
89
Big Picture Hypothesis Testing (Given dist’n, answer “yes-no”) Margin of Error (Find dist’n, use to measure error) Choose Sample Size (for given amount of error) Need better prob. tools
90
Big Picture Margin of Error Choose Sample Size Need better prob tools
91
Big Picture Margin of Error Choose Sample Size Need better prob tools Start with visualizing probability distributions
92
Big Picture Margin of Error Choose Sample Size Need better prob tools Start with visualizing probability distributions (key to “alternate representation”)
93
Visualization Idea: Visually represent “distributions” (2 types)
94
Visualization Idea: Visually represent “distributions” (2 types) a)Probability Distributions (e.g. Binomial)
95
Visualization Idea: Visually represent “distributions” (2 types) a)Probability Distributions (e.g. Binomial) Summarized by f(x)
96
Visualization Idea: Visually represent “distributions” (2 types) a)Probability Distributions (e.g. Binomial) Summarized by f(x) b)Lists of numbers, x 1, x 2, …, x n
97
Visualization Idea: Visually represent “distributions” (2 types) a)Probability Distributions (e.g. Binomial) Summarized by f(x) b)Lists of numbers, x 1, x 2, …, x n Use subscripts to index different ones
98
Visualization Examples of lists: (will often use below) 1.Collection of “#’s of Males, from HW ??? 2.2.3, 4.5, 4.7, 4.8, 5.1
99
Visualization Examples of lists: (will often use below) 1.Collection of “#’s of Males, from HW ??? 2.2.3, 4.5, 4.7, 4.8, 5.1 … (there are many others)
100
Visualization Connections between prob. dist’ns and lists
101
Visualization Connections between prob. dist’ns and lists: (i)Given dist’n, can construct a related list by drawing sample values from dist’n
102
Visualization Connections between prob. dist’ns and lists: (i)Given dist’n, can construct a related list by drawing sample values from dist’n e.g. Bi(1,0.5) (toss coins, count H’s) 1, 1, 1, 0, 0, 0, 1
103
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n,
104
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, (not thinking of these as random, so use lower case)
105
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n:
106
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n:
107
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: Use different symbol, to distinguish from f
108
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: Use different symbol, to distinguish from f Use “hat” to indicate “estimate”
109
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: E.g. For above list: 1, 1, 1, 0, 0, 0, 1
110
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: E.g. For above list: 1, 1, 1, 0, 0, 0, 1
111
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: Called the “empirical prob. dist’n” or “frequency distribution”
112
Visualization Connections between prob. dist’ns and lists (ii)Given a list, x 1, x 2, …, x n, can construct a dist’n: Called the “empirical prob. dist’n” or “frequency distribution” Provides probability model for: choose random number from list
113
Visualization Note: if start with f(x),
114
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, (as in (i))
115
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, (as in (i)) (random, so use capitals)
116
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, And construct frequency distribution of
117
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, And construct frequency distribution of Then for n large,
118
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, And construct frequency distribution of Then for n large, (so “hat” notation is sensible)
119
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, And construct frequency distribution of Then for n large, –Recall “frequentist interpretation” of probability
120
Visualization Note: if start with f(x), and draw random sample, X 1, X 2, …, X n, And construct frequency distribution of Then for n large, –Recall “frequentist interpretation” of probability –Can make precise, using
121
Visualization Simple visual representation for lists: Use number line, put x’s
122
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1
123
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
124
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
125
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
126
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
127
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
128
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6
129
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6 Picture already gives better impression than list of numbers
130
Visualization Simple visual representation for lists: Use number line, put x’s E.g. 2 (above) 2.3, 4.5, 4.7, 4.8, 5.1 2 3 4 5 6 Will be much better when lists become “too long to comprehend”
131
Visualization Drawbacks of: Number line, & x’s
132
Visualization Drawbacks of: Number line, & x’s When have many data points: Hard to construct Can’t see all (overplotting) Hard to interpret
133
Visualization Alternatives (Text, Sec. 1.1): Stem and leaf plots
134
Visualization Alternatives (Text, Sec. 1.1): Stem and leaf plots –Clever visualization, for only pencil & paper –But we have computers –So won’t study further
135
Visualization Alternatives (Text, Sec. 1.1): Stem and leaf plots Histograms –Will study carefully
136
Statistical Folklore Graphical Displays: Important Topic in Statistics Has large impact Need to think carefully to do this Watch for attempts to fool you
137
Statistical Folklore Graphical Displays: Interesting Article: “How to Display Data Badly” Howard Wainer The American Statistician, 38, 137-147. Internet Available: http://links.jstor.org
138
Statistical Folklore Main Idea: Point out 12 types of bad displays With reasons behind Here are some favorites…
139
Statistical Folklore Hiding the data in the scale
140
Statistical Folklore The eye perceives areas as “size”:
141
Statistical Folklore Change of Scales in Mid- Axis Really trust the Post???
142
Histograms Idea: show rectangles, where area represents
143
Histograms Idea: show rectangles, where area represents: (a)Distributions: probabilities
144
Histograms Idea: show rectangles, where area represents: (a)Distributions: probabilities (b)Lists (of numbers): # of observations
145
Histograms Idea: show rectangles, where area represents: (a)Distributions: probabilities (b)Lists (of numbers): # of observations Note: will studies these in parallel for a while (several concepts apply to both)
146
Histograms Idea: show rectangles, where area represents: (a)Distributions: probabilities (b)Lists (of numbers): # of observations Caution: There are variations not based on areas, see bar graphs in text
147
Histograms Idea: show rectangles, where area represents: (a)Distributions: probabilities (b)Lists (of numbers): # of observations Caution: There are variations not based on areas, see bar graphs in text But eye perceives area, so sensible to use it
148
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n
149
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n
150
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns: If possible values are: x = 0, 1, …, n,
151
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns: If possible values are: x = 0, 1, …, n, get good picture from choice: [-½, ½), [½, 1.5), [1.5, 2.5), …, [n-½, n+½)
152
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns: If possible values are: x = 0, 1, …, n, get good picture from choice: [-½, ½), [½, 1.5), [1.5, 2.5), …, [n-½, n+½) where [1.5, 2.5) is “all #s ≥ 1.5 and < 2.5”
153
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns: If possible values are: x = 0, 1, …, n, get good picture from choice: [-½, ½), [½, 1.5), [1.5, 2.5), …, [n-½, n+½) where [1.5, 2.5) is “all #s ≥ 1.5 and < 2.5” (called a “half open interval”)
154
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 same e.g. as above
155
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 Start with [1,3), [3,7) As above use half open intervals
156
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 Start with [1,3), [3,7) As above use half open intervals (to break ties)
157
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 Start with [1,3), [3,7) As above use half open intervals Note: These contain full data set
158
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 Start with [1,3), [3,7) Can use anything for class intervals
159
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n a. Prob. dist’ns b. Lists: e.g. 2.3, 4.5, 4.7, 4.8, 5.1 Start with [1,3), [3,7) Can use anything for class intervals But some choices better than others…
160
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n 2.Find “probabilities” or “relative frequencies” for each class
161
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n 2.Find “probabilities” or “relative frequencies” for each class (a) Probs: use f(x) for [x-½, x+½), etc.
162
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n 2.Find “probabilities” or “relative frequencies” for each class (a) Probs: use f(x) for [x-½, x+½), etc. (b) Lists: [1,3): rel. freq. = 1/5 = 20% [3,7): rel. freq. = 4/5 = 80%
163
Histograms Steps for Constructing Histograms: 1.Pick class intervals that contain full dist’n 2.Find “probabilities” or “relative frequencies” for each class 3.Above each interval, draw rectangle where area represents class frequency
164
Histograms 3.Above each interval, draw rectangle where area represents class frequency
165
Histograms 3.Above each interval, draw rectangle where area represents class frequency (a) Probs: If width = 1, then area = width x height = height
166
Histograms 3.Above each interval, draw rectangle where area represents class frequency (a) Probs: If width = 1, then area = width x height = height So get area = f(x), by taking height = f(x)
167
Histograms 3.Above each interval, draw rectangle where area represents class frequency (a) Probs: If width = 1, then area = width x height = height So get area = f(x), by taking height = f(x) E.g. Binomial Distribution
168
Binomial Prob. Histograms From Class Example 5 http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg5.xls
169
Binomial Prob. Histograms From Class Example 5 http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg5.xls Construct Prob. Histo: Create column of x values (do 1 st two, and drag box)
170
Binomial Prob. Histograms From Class Example 5 http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg5.xls Construct Prob. Histo: Create column of x values Compute f(x) values (create 1 st one, and drag twice)
171
Binomial Prob. Histograms From Class Example 5 http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg5.xls Construct Prob. Histo: Create column of x values Compute f(x) values Make bar plot
172
Binomial Prob. Histograms Make bar plot –“Insert” tab –Choose “Column” –Right Click – Select Data (Horizontal – x’s, “Add series”, Probs) –Resize, and move by dragging –Delete legend –Click and change title –Right Click on Bars, Format Data Series: Border Color, Solid Line, Black Series Options, Gap Width = 0
173
Binomial Prob. Histograms From Class Example 5 http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg5.xls Construct Prob. Histo: Create column of x values Compute f(x) values Make bar plot Make several, for interesting comparison
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.