Skip to content

Commit

Permalink
Deploying to gh-pages from @ 3a35bd4 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ismayc committed Dec 13, 2024
1 parent f8e2106 commit 7a189a9
Show file tree
Hide file tree
Showing 24 changed files with 160 additions and 160 deletions.
2 changes: 1 addition & 1 deletion 1-getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Chester Ismay and Albert Y. Kim Foreword by Kelly S. McConville" />


<meta name="date" content="2024-11-11" />
<meta name="date" content="2024-12-13" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
16 changes: 8 additions & 8 deletions 10-inference-for-regression.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Chester Ismay and Albert Y. Kim Foreword by Kelly S. McConville" />


<meta name="date" content="2024-11-11" />
<meta name="date" content="2024-12-13" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -795,7 +795,7 @@ <h3><span class="header-section-number">10.1.1</span> Teaching evaluations analy
<span id="cb441-4"><a href="10-inference-for-regression.html#cb441-4" tabindex="-1"></a><span class="fu">get_regression_table</span>(score_model)</span></code></pre></div>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:regtable-11">TABLE 10.1: </span><span id="tab:regtable-11">TABLE 10.2: </span>Previously seen linear regression table
<span id="tab:regtable-11">TABLE 10.1: </span>Previously seen linear regression table
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -890,10 +890,10 @@ <h3><span class="header-section-number">10.1.2</span> Sampling scenario<a href="
<p>Let’s now revisit this study in terms of the terminology and notation related to sampling we studied in Subsection <a href="7-sampling.html#terminology-and-notation">7.3.1</a>.</p>
<p>First, let’s view the instructors for these 463 courses as a <em>representative sample</em> from a greater <em>study population</em>. In our case, let’s assume that the study population is <em>all</em> instructors at UT Austin and that the sample of instructors who taught these 463 courses is a representative sample. Unfortunately, we can only <em>assume</em> these two facts without more knowledge of the <em>sampling methodology</em> used by the researchers.</p>
<p>Since we are viewing these <span class="math inline">\(n\)</span> = 463 courses as a sample, we can view our fitted slope <span class="math inline">\(b_1\)</span> = 0.067 as a <em>point estimate</em> of the <em>population slope</em> <span class="math inline">\(\beta_1\)</span>. In other words, <span class="math inline">\(\beta_1\)</span> quantifies the relationship between teaching <code>score</code> and “beauty” average <code>bty_avg</code> for <em>all</em> instructors at UT Austin. Similarly, we can view our fitted intercept <span class="math inline">\(b_0\)</span> = 3.88 as a <em>point estimate</em> of the <em>population intercept</em> <span class="math inline">\(\beta_0\)</span> for <em>all</em> instructors at UT Austin.</p>
<p>Putting these two ideas together, we can view the equation of the fitted line <span class="math inline">\(\widehat{y}\)</span> = <span class="math inline">\(b_0 + b_1 \cdot x\)</span> = <span class="math inline">\(3.880 + 0.067 \cdot \text{bty}\_\text{avg}\)</span> as an estimate of some true and unknown <em>population line</em> <span class="math inline">\(y = \beta_0 + \beta_1 \cdot x\)</span>. Thus we can draw parallels between our teaching evaluations analysis and all the sampling scenarios we’ve seen previously. In this chapter, we’ll focus on the final scenario of regression slopes as shown in Table <a href="10-inference-for-regression.html#tab:summarytable-ch11">10.3</a>.</p>
<p>Putting these two ideas together, we can view the equation of the fitted line <span class="math inline">\(\widehat{y}\)</span> = <span class="math inline">\(b_0 + b_1 \cdot x\)</span> = <span class="math inline">\(3.880 + 0.067 \cdot \text{bty}\_\text{avg}\)</span> as an estimate of some true and unknown <em>population line</em> <span class="math inline">\(y = \beta_0 + \beta_1 \cdot x\)</span>. Thus we can draw parallels between our teaching evaluations analysis and all the sampling scenarios we’ve seen previously. In this chapter, we’ll focus on the final scenario of regression slopes as shown in Table <a href="10-inference-for-regression.html#tab:summarytable-ch11">10.2</a>.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:summarytable-ch11">TABLE 10.3: </span><span id="tab:summarytable-ch11">TABLE 10.4: </span>Scenarios of sampling for inference
<span id="tab:summarytable-ch11">TABLE 10.2: </span>Scenarios of sampling for inference
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1007,10 +1007,10 @@ <h3><span class="header-section-number">10.1.2</span> Sampling scenario<a href="
</div>
<div id="regression-interp" class="section level2 hasAnchor" number="10.2">
<h2><span class="header-section-number">10.2</span> Interpreting regression tables<a href="10-inference-for-regression.html#regression-interp" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>We’ve so far focused only on the two leftmost columns of the regression table in Table <a href="10-inference-for-regression.html#tab:regtable-11">10.1</a>: <code>term</code> and <code>estimate</code>. Let’s now shift our attention to the remaining columns: <code>std_error</code>, <code>statistic</code>, <code>p_value</code>, <code>lower_ci</code> and <code>upper_ci</code> in Table <a href="10-inference-for-regression.html#tab:score-model-part-deux">10.5</a>.</p>
<p>We’ve so far focused only on the two leftmost columns of the regression table in Table <a href="10-inference-for-regression.html#tab:regtable-11">10.1</a>: <code>term</code> and <code>estimate</code>. Let’s now shift our attention to the remaining columns: <code>std_error</code>, <code>statistic</code>, <code>p_value</code>, <code>lower_ci</code> and <code>upper_ci</code> in Table <a href="10-inference-for-regression.html#tab:score-model-part-deux">10.3</a>.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:score-model-part-deux">TABLE 10.5: </span><span id="tab:score-model-part-deux">TABLE 10.6: </span>Previously seen regression table
<span id="tab:score-model-part-deux">TABLE 10.3: </span>Previously seen regression table
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1505,10 +1505,10 @@ <h3><span class="header-section-number">10.5.1</span> Theory-based inference for
</div>
<div id="summary-of-statistical-inference" class="section level3 hasAnchor" number="10.5.2">
<h3><span class="header-section-number">10.5.2</span> Summary of statistical inference<a href="10-inference-for-regression.html#summary-of-statistical-inference" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>We’ve finished the last two scenarios from the “Scenarios of sampling for inference” table in Subsection <a href="7-sampling.html#sampling-conclusion-table">7.6.1</a>, which we re-display in Table <a href="10-inference-for-regression.html#tab:table-ch11">10.7</a>.</p>
<p>We’ve finished the last two scenarios from the “Scenarios of sampling for inference” table in Subsection <a href="7-sampling.html#sampling-conclusion-table">7.6.1</a>, which we re-display in Table <a href="10-inference-for-regression.html#tab:table-ch11">10.4</a>.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:table-ch11">TABLE 10.7: </span><span id="tab:table-ch11">TABLE 10.8: </span>Scenarios of sampling for inference
<span id="tab:table-ch11">TABLE 10.4: </span>Scenarios of sampling for inference
</caption>
<thead>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions 11-thinking-with-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Chester Ismay and Albert Y. Kim Foreword by Kelly S. McConville" />


<meta name="date" content="2024-11-11" />
<meta name="date" content="2024-12-13" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -1027,7 +1027,7 @@ <h3><span class="header-section-number">11.2.3</span> Regression modeling<a href
<span id="cb475-6"><a href="11-thinking-with-data.html#cb475-6" tabindex="-1"></a><span class="fu">get_regression_table</span>(price_interaction)</span></code></pre></div>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:seattle-interaction">TABLE 11.1: </span><span id="tab:seattle-interaction">TABLE 11.2: </span>Regression table for interaction model
<span id="tab:seattle-interaction">TABLE 11.1: </span>Regression table for interaction model
</caption>
<thead>
<tr>
Expand Down
16 changes: 8 additions & 8 deletions 2-viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Chester Ismay and Albert Y. Kim Foreword by Kelly S. McConville" />


<meta name="date" content="2024-11-11" />
<meta name="date" content="2024-12-13" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -765,7 +765,7 @@ <h3><span class="header-section-number">2.1.2</span> Gapminder data<a href="2-vi
<p>In February 2006, a Swedish physician and data advocate named Hans Rosling gave a TED talk titled <a href="https://www.ted.com/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen">“The best stats you’ve ever seen”</a> where he presented global economic, health, and development data from the website <a href="http://www.gapminder.org/tools/#_locale_id=en;&amp;chart-type=bubbles">gapminder.org</a>. For example, for data on 142 countries in 2007, let’s consider only a few countries in Table <a href="2-viz.html#tab:gapminder-2007">2.1</a> as a peek into the data.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:gapminder-2007">TABLE 2.1: </span><span id="tab:gapminder-2007">TABLE 2.2: </span>Gapminder 2007 Data: First 3 of 142 countries
<span id="tab:gapminder-2007">TABLE 2.1: </span>Gapminder 2007 Data: First 3 of 142 countries
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -863,10 +863,10 @@ <h3><span class="header-section-number">2.1.2</span> Gapminder data<a href="2-vi
<li>The <code>data</code> variable <strong>Continent</strong> gets mapped to the <code>color</code> <code>aes</code>thetic of the points.</li>
</ol>
<p>We’ll see shortly that <code>data</code> corresponds to the particular data frame where our data is saved and that “data variables” correspond to particular columns in the data frame. Furthermore, the type of <code>geom</code>etric object considered in this plot are points. That being said, while in this example we are considering points, graphics are not limited to just points. We can also use lines, bars, and other geometric objects.</p>
<p>Let’s summarize the three essential components of the grammar in Table <a href="2-viz.html#tab:summary-table-gapminder">2.3</a>.</p>
<p>Let’s summarize the three essential components of the grammar in Table <a href="2-viz.html#tab:summary-table-gapminder">2.2</a>.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:summary-table-gapminder">TABLE 2.3: </span><span id="tab:summary-table-gapminder">TABLE 2.4: </span>Summary of the grammar of graphics for this plot
<span id="tab:summary-table-gapminder">TABLE 2.2: </span>Summary of the grammar of graphics for this plot
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1421,10 +1421,10 @@ <h3><span class="header-section-number">2.8.1</span> Barplots via <code>geom_bar
FIGURE 2.21: Number of flights departing NYC in 2013 by airline using geom_bar().
</p>
</div>
<p>Observe in Figure <a href="2-viz.html#fig:flightsbar">2.21</a> that United Airlines (UA), JetBlue Airways (B6), and ExpressJet Airlines (EV) had the most flights depart NYC in 2013. If you don’t know which airlines correspond to which carrier codes, then run <code>View(airlines)</code> to see a directory of airlines. For example, B6 is JetBlue Airways. Alternatively, say you had a data frame where the number of flights for each <code>carrier</code> was pre-counted as in Table <a href="2-viz.html#tab:flights-counted">2.5</a>.</p>
<p>Observe in Figure <a href="2-viz.html#fig:flightsbar">2.21</a> that United Airlines (UA), JetBlue Airways (B6), and ExpressJet Airlines (EV) had the most flights depart NYC in 2013. If you don’t know which airlines correspond to which carrier codes, then run <code>View(airlines)</code> to see a directory of airlines. For example, B6 is JetBlue Airways. Alternatively, say you had a data frame where the number of flights for each <code>carrier</code> was pre-counted as in Table <a href="2-viz.html#tab:flights-counted">2.3</a>.</p>
<table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;">
<caption style="font-size: initial !important;">
<span id="tab:flights-counted">TABLE 2.5: </span><span id="tab:flights-counted">TABLE 2.6: </span>Number of flights pre-counted for each carrier
<span id="tab:flights-counted">TABLE 2.3: </span>Number of flights pre-counted for each carrier
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1688,10 +1688,10 @@ <h3><span class="header-section-number">2.8.4</span> Summary<a href="2-viz.html#
<h2><span class="header-section-number">2.9</span> Conclusion<a href="2-viz.html#data-vis-conclusion" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<div id="summary-table" class="section level3 hasAnchor" number="2.9.1">
<h3><span class="header-section-number">2.9.1</span> Summary table<a href="2-viz.html#summary-table" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>Let’s recap all five of the five named graphs (5NG) in Table <a href="2-viz.html#tab:viz-summary-table">2.7</a> summarizing their differences. Using these 5NG, you’ll be able to visualize the distributions and relationships of variables contained in a wide array of datasets. This will be even more the case as we start to map more variables to more of each <code>geom</code>etric object’s <code>aes</code>thetic attribute options, further unlocking the awesome power of the <code>ggplot2</code> package.</p>
<p>Let’s recap all five of the five named graphs (5NG) in Table <a href="2-viz.html#tab:viz-summary-table">2.4</a> summarizing their differences. Using these 5NG, you’ll be able to visualize the distributions and relationships of variables contained in a wide array of datasets. This will be even more the case as we start to map more variables to more of each <code>geom</code>etric object’s <code>aes</code>thetic attribute options, further unlocking the awesome power of the <code>ggplot2</code> package.</p>
<table>
<caption>
<span id="tab:viz-summary-table">TABLE 2.7: </span>Summary of Five Named Graphs
<span id="tab:viz-summary-table">TABLE 2.4: </span>Summary of Five Named Graphs
</caption>
<thead>
<tr>
Expand Down
10 changes: 5 additions & 5 deletions 3-wrangling.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Chester Ismay and Albert Y. Kim Foreword by Kelly S. McConville" />


<meta name="date" content="2024-11-11" />
<meta name="date" content="2024-12-13" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -1144,7 +1144,7 @@ <h2><span class="header-section-number">3.5</span> <code>mutate</code> existing
<p>Let’s take a look at only the <code>dep_delay</code>, <code>arr_delay</code>, and the resulting <code>gain</code> variables for the first 5 rows in our updated <code>flights</code> data frame in Table <a href="3-wrangling.html#tab:first-five-flights">3.1</a>.</p>
<table class="table" style="margin-left: auto; margin-right: auto;">
<caption>
<span id="tab:first-five-flights">TABLE 3.1: </span><span id="tab:first-five-flights">TABLE 3.2: </span>First five rows of departure/arrival delay and gain variables
<span id="tab:first-five-flights">TABLE 3.1: </span>First five rows of departure/arrival delay and gain variables
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1497,10 +1497,10 @@ <h3><span class="header-section-number">3.8.3</span> <code>top_n</code> values o
<h2><span class="header-section-number">3.9</span> Conclusion<a href="3-wrangling.html#wrangling-conclusion" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<div id="summary-table-1" class="section level3 hasAnchor" number="3.9.1">
<h3><span class="header-section-number">3.9.1</span> Summary table<a href="3-wrangling.html#summary-table-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>Let’s recap our data wrangling verbs in Table <a href="3-wrangling.html#tab:wrangle-summary-table">3.3</a>. Using these verbs and the pipe <code>%&gt;%</code> operator from Section <a href="3-wrangling.html#piping">3.1</a>, you’ll be able to write easily legible code to perform almost all the data wrangling and data transformation necessary for the rest of this book.</p>
<p>Let’s recap our data wrangling verbs in Table <a href="3-wrangling.html#tab:wrangle-summary-table">3.2</a>. Using these verbs and the pipe <code>%&gt;%</code> operator from Section <a href="3-wrangling.html#piping">3.1</a>, you’ll be able to write easily legible code to perform almost all the data wrangling and data transformation necessary for the rest of this book.</p>
<table>
<caption>
<span id="tab:wrangle-summary-table">TABLE 3.3: </span>Summary of data wrangling verbs
<span id="tab:wrangle-summary-table">TABLE 3.2: </span>Summary of data wrangling verbs
</caption>
<thead>
<tr>
Expand Down Expand Up @@ -1583,7 +1583,7 @@ <h3><span class="header-section-number">3.9.1</span> Summary table<a href="3-wra
<li><strong>Crucial</strong>: Unless you are very confident in what you are doing, it is worthwhile not starting to code right away. Rather, first sketch out on paper all the necessary data wrangling steps not using exact code, but rather high-level <em>pseudocode</em> that is informal yet detailed enough to articulate what you are doing. This way you won’t confuse <em>what</em> you are trying to do (the algorithm) with <em>how</em> you are going to do it (writing <code>dplyr</code> code).</li>
<li>Take a close look at all the datasets using the <code>View()</code> function: <code>flights</code>, <code>weather</code>, <code>planes</code>, <code>airports</code>, and <code>airlines</code> to identify which variables are necessary to compute available seat miles.</li>
<li>Figure <a href="3-wrangling.html#fig:reldiagram">3.7</a> showing how the various datasets can be joined will also be useful.</li>
<li>Consider the data wrangling verbs in Table <a href="3-wrangling.html#tab:wrangle-summary-table">3.3</a> as your toolbox!</li>
<li>Consider the data wrangling verbs in Table <a href="3-wrangling.html#tab:wrangle-summary-table">3.2</a> as your toolbox!</li>
</ol>
<div class="learncheck">

Expand Down
Loading

0 comments on commit 7a189a9

Please sign in to comment.