Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
3584486
Create path to Chapter 5 so I can reference the folder elsewhere, use…
emilyps14 Feb 4, 2025
e952b6f
Setting up folder structure for Modules, Stub lectures for Week 6, Dr…
emilyps14 Feb 5, 2025
663506c
Typo: Edfinity
emilyps14 Feb 6, 2025
cfa61d5
First draft of active learning code
ghostpress Feb 11, 2025
58cd60f
Added population & sample charts, plus a table of p-hats
ghostpress Feb 11, 2025
5dc6bbd
Fixed density plots issue
ghostpress Feb 11, 2025
f5576e2
Moved a minor thing to helper function file
ghostpress Feb 11, 2025
964a6d1
Merge branch 'ma213' of https://github.com/emilyps14/openintro-statis…
ghostpress Feb 15, 2025
b4d6527
Started moving code to lecture folders and adapting to lecture plans
ghostpress Feb 15, 2025
bd2408a
Added Binomial distribution example
ghostpress Feb 17, 2025
db8151c
Added a question about sampling variability
ghostpress Feb 17, 2025
e0e189b
Cut down Lec15 demo, Lec16 will have more
ghostpress Feb 17, 2025
3c3e458
Added demo code for Lecture 16, incl Rshiny app with distributions
ghostpress Feb 17, 2025
75a8a4f
Forgot to commit Shiny
ghostpress Feb 20, 2025
0a65a4c
Updated TODOs
ghostpress Feb 20, 2025
55cbdd6
Added beamer.cls to gitignore
ghostpress Feb 24, 2025
6a40f0c
Tried adding placeholder slides and compiling with beamer.cls nearby
ghostpress Feb 24, 2025
4b04e94
Updated Lec15 demo code w/ suggestions from Emily
ghostpress Feb 24, 2025
9dff363
Finally got it to compile!
ghostpress Mar 2, 2025
abccec8
Added bib files
ghostpress Mar 4, 2025
39e4f32
Shortened R demo, added wd fix
ghostpress Mar 4, 2025
e78c877
Fixed typo
ghostpress Mar 4, 2025
79e1752
Shortened R Demo, updated TODOs
ghostpress Mar 4, 2025
f611422
Attempted to normalize histogram in plot of sample p-hats + normal dist
ghostpress Mar 4, 2025
cdc3f5a
Added rule of succession estimators to L15, fixed typo in L16
ghostpress Mar 4, 2025
a9e9b03
Wrote draft of Lecture 15 slides
ghostpress Mar 10, 2025
26cedc6
Deleted archived files
ghostpress Mar 13, 2025
7c7ff32
Wrote draft of Lecture 16 slides
ghostpress Mar 13, 2025
495def7
Updated paths
ghostpress Mar 13, 2025
aa41d01
Merge branch 'slides' into ch5-code
ghostpress Mar 14, 2025
75e9eb6
Tried to normalize histogram
ghostpress Mar 14, 2025
54b8272
Fixed histogram normalization
ghostpress Mar 18, 2025
564b593
Fixed histogram normalization
ghostpress Mar 18, 2025
f190bc5
Forgot
ghostpress Mar 18, 2025
c01221e
Removed unneeded comments
ghostpress Mar 18, 2025
a0c376f
Cleaning up
emilyps14 Mar 29, 2025
6be8e6c
Removing in-progress pdfs from Module 3
emilyps14 Mar 29, 2025
9732384
Removing Ch 5/code directory (draft, no longer used)
emilyps14 Mar 30, 2025
3a428bd
Removing copy of 5-1 notes from Module 3/Lec15
emilyps14 Mar 30, 2025
5fe9230
EPS first draft of Lecture 15
emilyps14 Mar 30, 2025
5f2233c
Changing "Module 3" folder to "Week 6"
emilyps14 Mar 31, 2025
3d0a976
Merge pull request #1 from emilyps14/ch5-code
emilyps14 Mar 31, 2025
c7a8148
Merge pull request #2 from emilyps14/ma213
emilyps14 Mar 31, 2025
8461ea5
Reorganized directories from Modules to Weeks
ghostpress Apr 1, 2025
77cab61
Week 6 changes
ghostpress Apr 1, 2025
615be89
Lecture 15 draft update
emilyps14 Apr 3, 2025
ad0af8e
Restoring Lecture 15 draft
emilyps14 Apr 14, 2025
210d401
Merge branch 'master' into lec15
emilyps14 Apr 14, 2025
ea834a6
Merge pull request #3 from emilyps14/lec15
jhuggins Apr 15, 2025
afa5235
Drafted lecture plans
ghostpress May 6, 2025
c2d2e31
Drafted week 1 lecture slides, ready for review (#6)
ghostpress May 9, 2025
0f07962
Renamed folders and filenames for consistency, removed spaces (#7)
ghostpress May 9, 2025
075de41
Week 2 lectures 3-4 drafts, lecture 5 is still in the air (#8)
ghostpress May 23, 2025
d173c55
Week 3 lectures 6-8 drafts (#9)
ghostpress May 23, 2025
97c4d4a
Lab 1 drafted and ready for review (#11)
YonghoLim May 23, 2025
b2cb88b
Lab1b updated (#12)
YonghoLim May 23, 2025
501b737
Week 4 lectures 9-11 drafted and ready for review (#13)
ghostpress May 30, 2025
e83442d
Week 5, lectures 12-14 drafted and ready for review (#14)
ghostpress May 30, 2025
c10c763
Week 6, Lecture 17 drafted and ready for review (#15)
ghostpress May 30, 2025
98489b7
Drafted Week 7, lectures 18-20 slides and updated plans
ghostpress May 29, 2025
2ddf94c
Revisions / TODOs for Lectures 1-3
emilyps14 May 29, 2025
e5eb9fa
Adding Think/Pair/Share to video in Lecture 3, move box plots to Lect…
emilyps14 May 30, 2025
229135f
Lecture 5 first draft plan
emilyps14 May 30, 2025
b7f0a8a
Updated title slides and image paths
ghostpress Jun 2, 2025
f0319c6
Two more image paths
ghostpress Jun 2, 2025
01c80c9
Fixed typos
ghostpress Jun 2, 2025
cba731b
Updated title slide and image paths
ghostpress Jun 2, 2025
ff0658b
Added lecture 3 agenda
ghostpress Jun 2, 2025
df0ac39
Fixed typo
ghostpress Jun 2, 2025
3ac79b2
Updated title slide, image paths, and added agenda
ghostpress Jun 2, 2025
d4534ae
Drafted week 8, lectures 21-23 slides and updated plans
ghostpress May 30, 2025
d483e5c
Fixed image paths
ghostpress May 30, 2025
24121b5
Updated title slides
ghostpress May 30, 2025
f572915
Drafted week 9, lectures 24-26 slides and updated plans
ghostpress May 30, 2025
bb1d644
Drafted week 10, lectures 27-29 slides and updated plans
ghostpress May 30, 2025
dada114
Drafted Week 11, lecture 30-32 slides and updated plans
ghostpress May 31, 2025
c545f22
Drafted week 12, lectures 33-35 and updated plans
ghostpress May 31, 2025
e430843
Merge branch 'master' into module1_es
ghostpress Jun 4, 2025
b99e151
Merge pull request #19 from emilyps14/module1_es
ghostpress Jun 4, 2025
8658cb9
Week 3 updated paths and title slides
ghostpress Jun 4, 2025
2f58487
Week 4 updated paths and title slides
ghostpress Jun 4, 2025
1d8a656
Week 5 updated paths and title slides
ghostpress Jun 4, 2025
3f7f2c3
Week 6 updated paths and title slides
ghostpress Jun 4, 2025
8397fb6
Week 7 updated paths and title slides
ghostpress Jun 4, 2025
c1296c9
Week 1 created agendas and updated slides
ghostpress Jun 9, 2025
18be034
Typo
ghostpress Jun 9, 2025
da62be1
Forgot to update frame titles
ghostpress Jun 9, 2025
381ffa9
Week 3 created agendas and updated slides
ghostpress Jun 9, 2025
0fe9a31
Week 4 created agendas and updated slides
ghostpress Jun 9, 2025
11acc0b
Week 5 created agendas and updated slides
ghostpress Jun 9, 2025
f9eda11
Week 6 created agendas and updated slides
ghostpress Jun 10, 2025
e4c923a
Week 7 created agendas and updated slides
ghostpress Jun 10, 2025
b0c11ab
Week 8 created agendas and updated slides
ghostpress Jun 10, 2025
63c646e
Week 9 created agendas and updated slides
ghostpress Jun 10, 2025
eba6885
Week 10 created agendas and updated slides
ghostpress Jun 10, 2025
74a1e6e
Week 11 created agendas and updated slides
ghostpress Jun 10, 2025
4039c49
Week 12 created agendas and updated slides
ghostpress Jun 10, 2025
d4d3c06
Lecture 6 revisions and todos
emilyps14 Jun 5, 2025
10ad033
starting on 6/7
emilyps14 Jun 5, 2025
bf06f06
Lecture7 revisions and todos
emilyps14 Jun 10, 2025
858e34d
Lecture 8 revisions and plan (moved some slides to Lecture 9, but hav…
emilyps14 Jun 10, 2025
ff1b1ea
Lab4 added
YonghoLim Jun 16, 2025
ce00aac
Minor typo corrected
YonghoLim Jun 16, 2025
43052cb
Merge pull request #24 from emilyps14/week3_ES
ghostpress Jun 17, 2025
7aff706
Lab4 typo corrected (#28)
YonghoLim Jun 17, 2025
438f4dd
Lecture 9 first pass
emilyps14 Jun 17, 2025
2872431
Lecture 10
emilyps14 Jun 19, 2025
4486fde
Lectures 11 and 12
emilyps14 Jun 19, 2025
574bcb7
Lecture 14
emilyps14 Jun 19, 2025
69f77fd
Remaining todos for Lectures 15, 16, 17
emilyps14 Jun 19, 2025
56dfd78
Lectures 18, 19, 20
emilyps14 Jun 19, 2025
2ca6f02
Merge pull request #29 from emilyps14/module2_ES
ghostpress Jun 19, 2025
4842b83
Merge pull request #30 from emilyps14/module3_ES
ghostpress Jun 19, 2025
94a2d6e
Lecture 21
emilyps14 Jun 19, 2025
8f2b06d
Lectures 22 and 23
emilyps14 Jun 19, 2025
d41dadc
Lectures 24 and 25
emilyps14 Jun 19, 2025
2f17807
Lecture 26
emilyps14 Jun 24, 2025
047df29
Lecture 27
emilyps14 Jun 24, 2025
b6fda67
Lecture 28, 29, 29b
emilyps14 Jun 24, 2025
0ea8b34
Creating space for Lecture 29b in the folder structure for Week 11
emilyps14 Jun 24, 2025
891defc
Renaming Lecture 29b to Lecture 30
emilyps14 Jun 24, 2025
48545db
Changing the folder names for the last three lectures
emilyps14 Jun 24, 2025
6ef0286
Changing file names for Lecture 30->31
emilyps14 Jun 24, 2025
f2360ee
Lecture 31 todos
emilyps14 Jun 24, 2025
9d819e5
Nam change Lecture 31->32
emilyps14 Jun 24, 2025
85d4fa2
Lecture 32 to dos
emilyps14 Jun 24, 2025
5852153
Name change Lecture 32->33
emilyps14 Jun 24, 2025
8237bea
Lecture 33 todos
emilyps14 Jun 24, 2025
b988514
Rename files Lecture 33->34
emilyps14 Jun 24, 2025
9dae0cd
Lecture 34 to dos
emilyps14 Jun 24, 2025
ff79c41
Names Lecture 34->35
emilyps14 Jun 24, 2025
8be7975
Lecture 35 plan
emilyps14 Jun 24, 2025
465b245
Name change Lecture 35->36
emilyps14 Jun 24, 2025
11a2636
Lab1 ready to be merged (#34)
YonghoLim Jun 26, 2025
5015b9a
Lecture 2 R demo, Edfinity quiz, and think/pair/share activity all dr…
ghostpress Jun 26, 2025
f18309b
Added comment about Guiness t-test example, removed line about an ext…
ghostpress Jun 26, 2025
318a2ab
Added a line for lecture/slides in between the interactive items in t…
ghostpress Jun 26, 2025
0bc60bc
Changed Edfinity quiz to think/pair/share and added one line to plan …
ghostpress Jun 26, 2025
67f9a6b
Modified Edfinity quiz plan to incorporate suggestion in comments
ghostpress Jun 26, 2025
c945753
Merge pull request #32 from emilyps14/module4_ES
ghostpress Jun 26, 2025
487685b
Moved Lecture33 folder into Week12 (from Week11)
ghostpress Jun 26, 2025
76fc930
Renamed lecture title slides to match lecture numbers (for now)
ghostpress Jun 26, 2025
336deb1
Merge pull request #33 from emilyps14/module5_ES
ghostpress Jun 26, 2025
4f93342
Lab5 updated
YonghoLim Jun 24, 2025
6a54181
Minor typo fixed
YonghoLim Jun 25, 2025
7ed9b71
La5 typo corrected
YonghoLim Jun 26, 2025
11f8241
Lab5 minor typo corrected
YonghoLim Jun 26, 2025
823a807
Lab6 updated : Simulation diagrams updated, questions updated, correc…
YonghoLim Jul 1, 2025
e483713
Lab1 ready for review and merge (#37)
YonghoLim Jul 22, 2025
7eb1a6f
Lab2 ready for review (#39)
YonghoLim Jul 25, 2025
71c2625
Lab3 updated : Acivity and Guide file seperated
YonghoLim Jul 2, 2025
821192d
Minor updates
YonghoLim Jul 7, 2025
6cb6954
Lab3 : Minor typo corrected
YonghoLim Jul 23, 2025
8bb1c0c
Lab1b erased
YonghoLim Jul 23, 2025
888b249
Lab4 ready for review and merge (#43)
YonghoLim Jul 25, 2025
fb599f6
Lab 6 updated: activity and guide files separated; exercises updated
YonghoLim Jul 17, 2025
0d7620c
Lab 6 updated
YonghoLim Jul 25, 2025
32c9196
Started working on Lecture 5 demo
ghostpress Jun 23, 2025
a5d8abd
Started lecture 2 R demo
ghostpress Jun 26, 2025
15c7228
Lecture 3 R demo and helper function
ghostpress Jun 26, 2025
4e47184
Added the 2nd R demonstration about variance
ghostpress Jun 26, 2025
15775db
Added stddev lines to histogram
ghostpress Jun 26, 2025
1595db4
Small edit to R demo
ghostpress Jul 1, 2025
1f92149
Updated plan and to-do's
ghostpress Jul 1, 2025
24dd320
Draft of a short R demo on boxplots
ghostpress Jul 1, 2025
e4ede93
Reworked simulation demo in style of Lab 4
ghostpress Jul 8, 2025
85af65c
Fixed bug in demo
ghostpress Jul 15, 2025
c7faedd
Revisions to Lecture 3 demo
emilyps14 Aug 5, 2025
49a0cc6
Working median into distribution section and defining percentiles bef…
emilyps14 Aug 5, 2025
fe37867
Updating Lecture 3 todos (nothing needs to be done before September)
emilyps14 Aug 5, 2025
4213d6a
Updating todos and R demo for Lecture 4
emilyps14 Aug 5, 2025
4fbc44b
Created first pass slides, using Chapter 2.3
emilyps14 Aug 5, 2025
19279e8
First complete draft of lecture 5
emilyps14 Aug 7, 2025
6115a9c
Stubs for slides based on outline
emilyps14 Aug 7, 2025
2f0e0b4
Fixed latex command in lecture 5 draft
ghostpress Aug 8, 2025
bbda5a1
Merge pull request #50 from emilyps14/lecture5_es
ghostpress Aug 8, 2025
c8f19dd
Lab7 updated : activity, guide files are updated
YonghoLim Jul 22, 2025
c2ea134
removed RData file
YonghoLim Aug 8, 2025
a558a64
Draft of logistics slides (very dry!)
emilyps14 Aug 12, 2025
02a3daf
Big picture slides borrowed from LibreTexts
emilyps14 Aug 12, 2025
e769471
Added Case Study slides
emilyps14 Aug 12, 2025
34eae66
Updating todos
emilyps14 Aug 13, 2025
5c1c7c4
Merge pull request #54 from emilyps14/lecture1_es
ghostpress Aug 13, 2025
5f25ab6
Updated gitignore
ghostpress Aug 14, 2025
fd6adf9
Created separate R setup file for before lecture and updated R demo
ghostpress Aug 14, 2025
a11bc0b
Changed to Guiness example, updated data figures using R, still needs…
emilyps14 Aug 15, 2025
69d74b0
Adding population parameter and sample statistic to running example, …
emilyps14 Aug 15, 2025
15a8d22
Typo
emilyps14 Aug 15, 2025
1a621bb
Adding explanation for outlier Edfinity question
emilyps14 Aug 15, 2025
376b8ef
Applet plan for robust statistics / outliers
emilyps14 Aug 15, 2025
b18eb2a
Reworking the single sample HT example to be single sample (Guiness)
emilyps14 Aug 15, 2025
afaa1f4
Forgot to save a few changes
emilyps14 Aug 15, 2025
9297799
Merge pull request #56 from emilyps14/lecture2_es
ghostpress Aug 19, 2025
170a474
Replaced a section frame to be a placeholder for board work, to refle…
ghostpress Aug 19, 2025
324fa77
Drafted learning objectives doc for course site
ghostpress Aug 11, 2025
dbc1472
Added core/auxiliary labels to learning objectives
ghostpress Aug 13, 2025
dce5843
Merge branch 'master' into lecture24_es
ghostpress Aug 20, 2025
1d87449
Merge pull request #58 from emilyps14/lecture24_es
ghostpress Aug 20, 2025
c58b28a
Merge branch 'master' into lecture4_es
ghostpress Aug 20, 2025
0d53082
Merge pull request #57 from emilyps14/lecture4_es
ghostpress Aug 20, 2025
08d6f87
Lab6 to week9, added P2week10 for Project 2 Week 10 guide
YonghoLim Aug 21, 2025
79bf58d
Project 2 week2 material updated. Project 2 work material has been ch…
YonghoLim Nov 5, 2025
e6c14cf
Minor typos are corrected
YonghoLim Nov 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@
*.log
*.vrb
*.snm
*.fdb_latexmk
.Rhistory
.latex.json
beamer.cls
*.pdf
*.bbl
*.blg
lectureDraftArchives/
lecture_1_classroom_survey.csv
lecture_1_survey_data_clean.csv
13 changes: 13 additions & 0 deletions Chp 2/2-1_numerical_data/figures/gpa_dot_plot/gpa.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ polygon(M + c(-2,2,0)*0.01, c(0.25, 0.25, 0.5), border=COL[4], col=COL[4])

dev.off()

# with median

myPDF('gpa_dot_plot_median.pdf', 7, 1.5, mar=c(4,0.5,0.5,0.5), cex.lab = 1.5, cex.axis = 1.25)

openintro::dotPlot(gpa, pch = 19, col = COL[1,4], xlab = "GPA", xlim = c(2.5,4), ylab = "")
M <- mean(d$gpa[d$gpa <= 4], na.rm = TRUE)
polygon(M + c(-2,2,0)*0.01, c(0.25, 0.25, 0.5), border=COL[7], col=COL[7])
Med <- median(d$gpa[d$gpa <= 4], na.rm = TRUE)
polygon(Med + c(-2,2,0)*0.01, c(0.25, 0.25, 0.5), border=COL[4], col=COL[4])

dev.off()


# stacked


Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions Chp 2/2-1_numerical_data/figures/house_income/house_income.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ d = read.csv("house_income.csv")

house_income = d$house_income[!is.na(d$house_income) & d$house_income < 4000000]

# Sort the cleaned house_income vector and save as a new CSV
house_income_sorted <- sort(house_income)
write.csv(data.frame(house_income = house_income_sorted), file = "house_income_sorted.csv", row.names = FALSE)


myPDF('house_income_dot_stacked.pdf', 7, 3, mar=c(4,2,0.5,0.5), cex.lab = 1.5, cex.axis = 1.25)

Expand Down
20 changes: 10 additions & 10 deletions Chp 5/5-1_point_est_sampling_var/5-1_point_est_sampling_var.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Point estimates and sampling variability}
\section{Point estimates and sampling variability!!!}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand Down Expand Up @@ -52,9 +52,9 @@ \subsection{Understanding the variability of a point estimate}
\frametitle{}

\begin{center}
\includegraphics[width=0.95\textwidth]{5-1_point_est_sampling_var/figures/pew/pew1} \\
\includegraphics[width=0.95\textwidth]{5-1_point_est_sampling_var/figures/pew/pew2} \\
\includegraphics[width=0.95\textwidth]{5-1_point_est_sampling_var/figures/pew/pew3}
\includegraphics[width=0.95\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/pew/pew1} \\
\includegraphics[width=0.95\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/pew/pew2} \\
\includegraphics[width=0.95\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/pew/pew3}
\end{center}

\ct{\webURL{http://pewresearch.org/pubs/2191/young-adults-workers-labor-market-pay-careers-advancement-recession}}
Expand All @@ -67,7 +67,7 @@ \subsection{Understanding the variability of a point estimate}
\frametitle{Margin of error}

\begin{center}
\includegraphics[width=0.95\textwidth]{5-1_point_est_sampling_var/figures/pew/pew4}
\includegraphics[width=0.95\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/pew/pew4}
\end{center}

\begin{itemize}
Expand Down Expand Up @@ -157,7 +157,7 @@ \subsection{Application exercise}
Suppose you were to repeat this process many times and obtain many $\hat{p}$s. This distribution is called a \hl{sampling distribution}.

\begin{center}
\includegraphics[width=0.6\textwidth]{5-1_point_est_sampling_var/figures/solar-power/solar-power-sampling.pdf}
\includegraphics[width=0.6\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/solar-power/solar-power-sampling.pdf}
\end{center}

\end{frame}
Expand All @@ -170,7 +170,7 @@ \subsection{Application exercise}
\dq{What is the shape and center of this distribution? Based on this distribution, what do you think is the true population proportion?}

\begin{center}
\includegraphics[width=0.6\textwidth]{5-1_point_est_sampling_var/figures/solar-power/solar-power-sampling.pdf}
\includegraphics[width=0.6\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/solar-power/solar-power-sampling.pdf}
\end{center}

$\:$ \\
Expand Down Expand Up @@ -282,7 +282,7 @@ \subsection{More details regarding the Central Limit Theorem}

\soln{No, the success-failure condition is not met ($50 * 0.05 = 2.5$), hence we would not expect the sampling distribution to be nearly normal.
\begin{center}
\includegraphics[width=0.55\textwidth]{5-1_point_est_sampling_var/figures/sf/low-p.pdf}
\includegraphics[width=0.55\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/sf/low-p.pdf}
\end{center}
}

Expand All @@ -295,8 +295,8 @@ \subsection{More details regarding the Central Limit Theorem}
\dq{What happens when $np$ and/or $n(1-p)$ $<$ 10?}

\begin{center}
\includegraphics[width=0.45\textwidth]{5-1_point_est_sampling_var/figures/clt_prop_grid/clt_prop_grid_1.pdf}
\includegraphics[width=0.45\textwidth]{5-1_point_est_sampling_var/figures/clt_prop_grid/clt_prop_grid_2.pdf}
\includegraphics[width=0.45\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/clt_prop_grid/clt_prop_grid_1.pdf}
\includegraphics[width=0.45\textwidth]{\chp5@path/5-1_point_est_sampling_var/figures/clt_prop_grid/clt_prop_grid_2.pdf}
\end{center}

\end{frame}
Expand Down
8 changes: 4 additions & 4 deletions Chp 5/5-2_ci_prop/5-2_ci_prop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ \subsection{Capturing the population parameter}
$\:$ \\
\begin{columns}[c]
\column{0.25\textwidth}
\includegraphics[width=\textwidth]{5-2_ci_prop/figures/spear}
\includegraphics[width=\textwidth]{\chp5@path/5-2_ci_prop/figures/spear}
\column{0.5\textwidth}
{\small
We can throw a spear where we saw a fish but we will probably miss. If we toss a net in that area, we have a good chance of catching the fish.
}
\column{0.25\textwidth}
\includegraphics[width=\textwidth]{5-2_ci_prop/figures/net}
\includegraphics[width=\textwidth]{\chp5@path/5-2_ci_prop/figures/net}
\end{columns}
$\:$ \\
\item If we report a point estimate, we probably won't hit the exact population parameter. If we report a range of plausible values we have a good shot at capturing the parameter.
Expand Down Expand Up @@ -135,7 +135,7 @@ \subsection{Constructing a 95\% confidence interval}

\dq{Can you see any drawbacks to using a wider interval?}
\begin{center}
\includegraphics[width=0.9\textwidth]{5-2_ci_prop/figures/garfield}
\includegraphics[width=0.9\textwidth]{\chp5@path/5-2_ci_prop/figures/garfield}
\end{center}

\pause
Expand Down Expand Up @@ -192,7 +192,7 @@ \subsection{Changing the confidence level}

\soln{\only<2>{
\begin{center}
\includegraphics[width=0.7\textwidth]{5-2_ci_prop/figures/middle98/middle98}
\includegraphics[width=0.7\textwidth]{\chp5@path/5-2_ci_prop/figures/middle98/middle98}
\end{center}
}}

Expand Down
2 changes: 1 addition & 1 deletion Chp 5/5-3_ht_prop/5-3_ht_prop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ \subsection{Hypothesis testing framework}
\frametitle{Result}

\begin{center}
\includegraphics[width=0.75\textwidth]{5-3_ht_prop/figures/discRandDotPlot/discRandDotPlot}
\includegraphics[width=0.75\textwidth]{\chp5@path/5-3_ht_prop/figures/discRandDotPlot/discRandDotPlot}
\end{center}

\pause
Expand Down
Binary file modified Chp 5/chp5.pdf
Binary file not shown.
7 changes: 4 additions & 3 deletions Chp 5/chp5.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
\documentclass[t,compress,mathserif]{beamer}
\newcommand{\soln}[1]{\textit{#1}}
\newcommand{\solnGr}[1]{#1}
\def\chp5@path{.}

% Option 2: Handouts without solutions

Expand Down Expand Up @@ -66,9 +67,9 @@
% Sections
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input{5-1_point_est_sampling_var/5-1_point_est_sampling_var}
\input{5-2_ci_prop/5-2_ci_prop}
\input{5-3_ht_prop/5-3_ht_prop}
\input{\chp5@path/5-1_point_est_sampling_var/5-1_point_est_sampling_var}
\input{\chp5@path/5-2_ci_prop/5-2_ci_prop}
\input{\chp5@path/5-3_ht_prop/5-3_ht_prop}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
78 changes: 78 additions & 0 deletions Chp 7/7-1_one_t/figures/guiness/guiness.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Guinness alcohol content example
library(openintro)

# Data: alcohol content (% ABV) for 8 batches
alcohol <- c(4.8, 4.6, 4.7, 4.5, 4.9, 4.6, 4.8, 4.4)
target <- 4.5

# Histogram
myPDF("guinessHist.pdf", 1.1*5.5, 3.3, mar=c(3.5,3.5,0.15,0.5), mgp=c(2.4,0.7,0))

histPlot(
alcohol,
col="#22558833",
border="#225588",
xlab = "Alcohol Content of Guinness Batches (%)",
xlim = c(4.25, 5.05),
breaks = seq(4.25, 5.05, by = 0.1),
axes = FALSE
)
# Add custom x and y axes
axis(1, at=seq(4.3, 5.0, by=0.1))
axis(2)

dev.off()


# t-test
tres <- t.test(alcohol, mu=target, alternative = "two.sided")
tstat <- as.numeric(tres$statistic)
df <- tres$parameter
pval <- tres$p.value

# P-value plot
myPDF('guinessPvalue.pdf', 4, 2, mar=c(4,1,0.1,1), mgp=c(5,0.45,0))

plot(c(-4, 4), c(0, dnorm(0)), type='n', axes=FALSE, ylab = "", xlab = "")
mean_alc <- mean(alcohol)
symm_val <- 2*target - mean_alc

axis(1, at = c(-5, -tstat, 0, tstat, 5),
labels = c(NA,
-round(tstat,2),
0,
round(tstat,2),
NA),
line=0)
mtext("t", side = 1, line = 0.5, at = 4, adj = 1, cex = 1)

axis(1, at = c(-5, -tstat, 0, tstat, 5),
labels = c(NA,
round(symm_val,2),
expression(paste(mu, "= 4.5")),
bquote(bar(X) == .(round(mean_alc,2))),
NA),
line=2.5)

abline(h=0)

X <- seq(-8, 8, 0.01)
Y <- dt(X, df)
lines(X, Y, col="black")

these <- which(X > tstat)
yy <- c(0, Y[these], 0)
these <- c(these[1], these, rev(these)[1])
xx <- X[these]
polygon(xx, yy, col='#22558833', border='#225588')

these <- which(X < -tstat)
yy <- c(0, Y[these], 0)
these <- c(these[1], these, rev(these)[1])
xx <- X[these]
polygon(xx, yy, col='#22558833', border='#225588')

text(3,0.8*max(Y),"df = 7", cex = 0.9)

dev.off()

Binary file added Chp 7/7-1_one_t/figures/guiness/guinessHist.pdf
Binary file not shown.
Binary file added Chp 7/7-1_one_t/figures/guiness/guinessPvalue.pdf
Binary file not shown.
Binary file added Week1/Lecture1/BigPicture1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week1/Lecture1/BigPicture2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Week1/Lecture1/Lecture1_agenda.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Recap/Agenda
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO better formatting
\begin{frame}
\frametitle{Module 1: Exploratory Data Analysis and Study Design}
\begin{itemize}
% \item \hl{This time: }Course introduction
\item \hl{Reading: }Chapter 1 for next time
\item \hl{Deadlines/Announcements: }
\begin{itemize}
\item See/email me (estephen@bu.edu) for any registration issues
\item Edfinity classroom survey by lecture on Friday \\
(if you haven't done it yet)
\item Labs start this week (Friday)
\item Discussions start next week
\item Edfinity Homework 1 due on Monday
\end{itemize}
\end{itemize}

\end{frame}

Loading