Skip to content

Commit

Permalink
slight reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hathawayj committed Sep 6, 2024
1 parent a3283b9 commit 10077ec
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 38 deletions.
57 changes: 34 additions & 23 deletions docs/key_principles.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.553">
<meta name="generator" content="quarto-1.5.57">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Math326 Notebook - Key Principles of Experimentation</title>
<title>Key Principles of Experimentation – Math326 Notebook</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -83,13 +83,13 @@
</a>
</div>
<div id="quarto-search" class="" title="Search"></div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item dropdown ">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-basics-of-design" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-basics-of-design" role="link" data-bs-toggle="dropdown" aria-expanded="false">
<span class="menu-text">Basics of Design</span>
</a>
<ul class="dropdown-menu" aria-labelledby="nav-menu-basics-of-design">
Expand Down Expand Up @@ -120,7 +120,7 @@
</ul>
</li>
<li class="nav-item dropdown ">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-specific-designs" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-specific-designs" role="link" data-bs-toggle="dropdown" aria-expanded="false">
<span class="menu-text">Specific Designs</span>
</a>
<ul class="dropdown-menu" aria-labelledby="nav-menu-specific-designs">
Expand Down Expand Up @@ -167,7 +167,7 @@
</ul>
</li>
<li class="nav-item dropdown ">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-broad-topics" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-broad-topics" role="link" data-bs-toggle="dropdown" aria-expanded="false">
<span class="menu-text">Broad Topics</span>
</a>
<ul class="dropdown-menu" aria-labelledby="nav-menu-broad-topics">
Expand Down Expand Up @@ -206,7 +206,7 @@
</ul>
</li>
<li class="nav-item dropdown ">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-r-instructions" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-r-instructions" role="link" data-bs-toggle="dropdown" aria-expanded="false">
<span class="menu-text">R Instructions</span>
</a>
<ul class="dropdown-menu" aria-labelledby="nav-menu-r-instructions">
Expand All @@ -223,7 +223,7 @@
</ul>
<ul class="navbar-nav navbar-nav-scroll ms-auto">
<li class="nav-item dropdown ">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-datasets" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="nav-menu-datasets" role="link" data-bs-toggle="dropdown" aria-expanded="false">
<span class="menu-text">Datasets</span>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="nav-menu-datasets">
Expand All @@ -239,7 +239,7 @@
</li>
</ul>
</div> <!-- /navcollapse -->
<div class="quarto-navbar-tools">
<div class="quarto-navbar-tools">
</div>
</div> <!-- /container-fluid -->
</nav>
Expand All @@ -248,7 +248,7 @@
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom">

</div>
<!-- main -->
Expand Down Expand Up @@ -330,18 +330,7 @@ <h1 class="title">Key Principles of Experimentation</h1>
}
return false;
}
const clipboard = new window.ClipboardJS('.code-copy-button', {
text: function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
});
clipboard.on('success', function(e) {
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
Expand Down Expand Up @@ -373,15 +362,37 @@ <h1 class="title">Key Principles of Experimentation</h1>
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
// For code content inside modals, clipBoardJS needs to be initialized with a container option
// TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860)
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
Expand Down
32 changes: 17 additions & 15 deletions key_principles.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@
title: "Key Principles of Experimentation"
---

When researchers are faced with a question, their response is often to collect data so they can understand answers to that question. While this seems like a great idea, without a plan, it is likely to be inefficient and may lead to erroneous conclusions. Experimental design is the process of creating a plan, implementing that plan, analyzing the results, and making proper conclusions. This plan creates an efficient and effective road map that will help the researcher better understand the problem and the variables that they have questions about. A well-designed experiment will allow the researcher to minimize the effect of variables that are not of interest and reduce unwanted variability, making it easier to better understand the effect of variables that are of interest.
When researchers are faced with a question, their response is often to collect data so they can understand answers to that question. While this seems like a great idea, without a plan, it is likely to be inefficient and may lead to erroneous conclusions. Experimental design is the process of creating a plan, implementing that plan, analyzing the results, and making proper conclusions. This plan creates an efficient and effective road map that will help the researcher better understand the problem and the variables that they have questions about. A well-designed experiment will allow the researcher to minimize the effect of variables that are not of interest and reduce unwanted variability, making it easier to better understand the effect of variables that are of interest.

This textbook will explore the necessary steps to consider as you plan and perform an experiment. These steps include:
This textbook will explore the necessary steps to consider as you plan and perform an experiment. These steps include:

1. Understand the objectives of your research. What questions should be answered?
2. Determine the measurements that will be needed to help answer the questions of interest.
3. Determine which variables, which we will call factors, are the sources of variation in the measurements. Determine which of these factors you will be testing and decide which levels of those factors will be included in the study. Determine which of these factors you will hold constant.
4. Determine how sampling and treatment assignments will be done and then collect the data.
5. Identify the analysis technique that will be applied, including how to test hypotheses
6. Describe the data using numerical and graphical summaries.
7. Perform the analysis and make sure that the analysis is appropriate.
8. Make conclusions.
1. Understand the objectives of your research. What questions should be answered?\
2. Determine the measurements that will be needed to help answer the questions of interest.
3. Determine which variables, which we will call factors, are the sources of variation in the measurements. Determine which of these factors you will be testing and decide which levels of those factors will be included in the study. Determine which of these factors you will hold constant.
4. Determine how sampling and treatment assignments will be done and then collect the data.
5. Identify the analysis technique that will be applied, including how to test hypotheses
6. Describe the data using numerical and graphical summaries.
7. Perform the analysis and make sure that the analysis is appropriate.
8. Make conclusions.

This textbook will further discuss each of these steps in detail and offer examples. Steps 1-4 will be discussed in the “Basics of Design” section. Steps 5, 7, and 8 will be discussed in the “Specific Designs” and “Broad Topics” sections. Step 6 will be discussed in the “R Instructions” section.
This textbook will further discuss each of these steps in detail and offer examples. Steps 1-4 will be discussed in the “Basics of Design” section. Steps 5, 7, and 8 will be discussed in the “Specific Designs” and “Broad Topics” sections. Step 6 will be discussed in the “R Instructions” section.

Before detailing each of these steps, it is important to understand the differences between **observational studies** and designed experiments. In observational studies the researchers do not control the conditions of the study. The data are collected by observation. In this case, the researchers cannot assign the subjects to the conditions and factors in the study. An example of this would be studying to see if there is a difference in the amount of wind at the three Brigham Young University (BYU) campuses. In this study the factor is campus. The campus factor has 3 levels: BYU, BYU-Idaho, and BYU-Hawaii. The measurement taken would be the average wind speed for a particular day. The researchers cannot assign the particular days to a specific campus. Instead, they may select random days and then collect the data for those days. This data would be collected through observation, not through experimentation.
Before detailing each of these steps, it is important to understand the differences between **observational studies** and designed experiments. In observational studies the researchers do not control the conditions of the study. The data are collected by observation. In this case, the researchers *cannot* *assign* the subjects to the conditions or treatments.

**Designed experiments** are studies in which the researchers control the conditions in which the study is performed. In designed experiments the researchers assign subjects to levels of a factor. The method used in making those assignments will be discussed further in the “Design” section of a Specific Design's page. An example of this would be determining which of four different toothbrush types are better at reducing plaque. The researchers would randomly assign each subject to one of the toothbrush types and then carry out the experiment.
An example of this would be studying to see if there is a difference in the amount of wind at the three Brigham Young University (BYU) campuses. In this study the factor is campus. The campus factor has 3 levels: BYU, BYU-Idaho, and BYU-Hawaii. The measurement taken would be the average wind speed for a particular day. The researchers cannot assign the particular days to a specific campus. Instead, they may select random days and then collect the data for those days. This data would be collected through observation, not through experimentation.

Experiments have the advantage over observational studies in isolating a factor's effect on a response, and thereby proving causality. Sometimes however it is not ethical to assign someone to a condition that is of interest, for example you should not assign anyone to experience the effects of smoking - even if you wanted to study the impact of smoking. In some cases, it may be impossible to assign someone to a condition, for example gender. Furthermore, an observational study may be preferred because it may be a more realistic view of how something will truly play out "in the real world", rather than in a contrived lab experiment.
**Designed experiments** are studies in which the researchers control the conditions in which the study is performed. *In designed experiments the researchers assign subjects to conditions.* The method used in making those assignments will be discussed further in the “Design” section of a Specific Design's page. An example of this would be determining which of four different toothbrush types are better at reducing plaque. The researchers would randomly assign each subject to one of the toothbrush types and then carry out the experiment.

Although both types of studies can be used to better understand and answer research questions, this textbook will mostly focus on the steps needed to best design an experiment. The toothbrush study just introduced above will be used to help illustrate how to work thru the process of designing an experiment.
Experiments have the advantage over observational studies in isolating a factor's effect on a response, and thereby proving causality. Sometimes however it is not ethical to assign someone to a condition that is of interest, for example you should not assign anyone to experience the effects of smoking - even if you wanted to study the impact of smoking. In some cases, it may be impossible to assign someone to a condition, for example gender. Furthermore, an observational study may be preferred because it may be a more realistic view of how something will truly play out "in the real world", rather than in a contrived lab experiment.

Although both types of studies can be used to better understand and answer research questions, this textbook will mostly focus on the steps needed to best design an experiment. The toothbrush study just introduced above will be used to help illustrate how to work through the process of designing an experiment.

0 comments on commit 10077ec

Please sign in to comment.