<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/experimental-design-exercises/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.r-exercises.com/2017/04/23/experimental-design-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=experimental-design-exercises"> R-exercises</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a target="_blank" rel="nofollow" href="https://i2.wp.com/www.r-exercises.com/wp-content/uploads/2017/04/experimental-design-linearity.png"><img sizes="(max-width: 150px) 100vw, 150px" alt="" class="wp-image-5387" src="https://i1.wp.com/www.r-exercises.com/wp-content/uploads/2017/04/experimental-design-linearity-150x150.png?resize=150%2C150" data-recalc-dims="1"></a></p>
<p>In this set of exercises we shall follow the practice of conducting an experimental study. Researcher wants to see if there is any influence of working-out on body mass. Three groups of subjects with similar food and sport habits were included in the experiment. Each group was subjected to a different set of exercises. Body mass was measured before and after workout. The focus of the research is the difference in body mass between groups, measured after working-out. In order to examine these effects, we shall use paired t test, t test for independent samples, one-way and two-ways analysis of variance and analysis of covariance.</p>
<p>You can download the dataset <a target="_blank" rel="nofollow" href="http://r-exercises.com/wp-content/uploads/2017/04/experimental-design.csv">here</a>. The data is fictious.</p>
<p>Answers to the exercises are available <a target="_blank" rel="nofollow" href="http://r-exercises.com/2017/04/23/experimental-design-solutions/">here</a>.</p>
<p>If you have different solution, feel free to post it.</p>
<p>
<strong>Exercise 1</strong>
</p>
<p>Load the data. Calculate descriptive statistics and test for the normality of both initial and final measurements for whole sample and for each group.</p>
<p>
<strong>Exercise 2</strong>
</p>
<p>Is there effect of exercises and what is the size of that effect for each group? (Tip: <i>You should use paired t test.</i>)</p>
<p>
<strong>Exercise 3</strong>
</p>
<p>Is the variance of the body mass on final measurement the same for each of the three groups? (Tip: <i>Use Levene’s test for homogeneity of variances</i>)</p>
<p>
<strong>Exercise 4</strong>
</p>
<p>Is there a difference between groups on final measurement and what is the effect size? (Tip: <i>Use one-way ANOVA</i>)</p>
<div>
<aside><img src="http://www.r-exercises.com/2017/04/23/experimental-design-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=experimental-design-exercises"></aside>
<div><strong>Learn more</strong> about statistics for your experimental design in the online course <a target="_blank" rel="nofollow" href="http://www.r-exercises.com/product/learn-by-example-statistics-and-data-science-in-r/">Learn By Example: Statistics and Data Science in R</a>. In this course you will learn how to:
<ul>
<li>Work thru regression problems</li>
<li>use different statistical tests and interpret them</li>
<li>And much more</li>
</ul>
</div>
</div>
<p><strong>Exercise 5</strong>
</p>
<p>Between which groups does the difference of body mass appear after the working-out? (Tip: <i>Conduct post-hoc test.</i>)</p>
<p>
<strong>Exercise 6</strong>
</p>
<p>What is the impact of age and working-out program on body mass on final measurement? (Tip: <i>Use two-way between groups ANOVA.</i>)</p>
<p>
<strong>Exercise 7</strong>
</p>
<p>What is the origin of effect of working-out program between subjects of different age? (Tip: <i>You should conduct post-hoc test.</i>)</p>
<p>
<strong>Exercise 8</strong>
</p>
<p>Is there a linear relationship between initial and final measurement of body mass for each group?</p>
<p>
<p>
<strong>Exercise 9</strong>
</p>
<p>Is there a significant difference in body mass on final measurement between groups, while controlling for initial measurement?</p>
<p>
<strong>Exercise 10</strong>
</p>
<p>How much of the variance is explained by independent variable? How much of the variance is explained by covariate?</p>
<div>
<h3>Related exercise sets:</h3>
<ol>
<li><a title="Repeated measures ANOVA in R Exercises" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2016/11/29/repeated-measures-anova-in-r-exercises/">Repeated measures ANOVA in R Exercises </a></li>
<li><a title="One Way Analysis of Variance Exercises" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2016/09/30/one-way-analysis-of-variance-exercises/">One Way Analysis of Variance Exercises </a></li>
<li><a title="Data science for Doctors: Inferential Statistics Exercises (part-2)" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2017/03/19/data-science-for-doctors-inferential-statistics-exercises-part-2/">Data science for Doctors: Inferential Statistics Exercises (part-2) </a></li>
<li><a target="_blank" rel="nofollow" href="http://www.r-exercises.com/start-here-to-learn-r/">Explore all our (>1000) R exercises</a></li>
<li><a target="_blank" rel="nofollow" href="http://www.r-exercises.com/r-courses/">Find an R course using our R Course Finder</a> directory</li>
</ol>
</div>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.r-exercises.com/2017/04/23/experimental-design-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=experimental-design-exercises"> R-exercises</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/G3ZX35XDMqk"></a></div>