{"id":11649,"date":"2019-12-25T12:14:56","date_gmt":"2019-12-25T10:14:56","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?post_type=dt_lessons&#038;p=11649"},"modified":"2019-12-25T12:15:33","modified_gmt":"2019-12-25T10:15:33","slug":"one-sample-t-test","status":"publish","type":"dt_lessons","link":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/","title":{"rendered":"One Sample T-Test"},"content":{"rendered":"<div id=\"rdoc\">\n<p>The <strong>one-sample t-test<\/strong>, also known as the <em>single-parameter t test<\/em> or <em>single-sample t-test<\/em>, is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. Another synonym is the <em>one-way t-test<\/em>.<\/p>\n<p>Generally, the theoretical mean comes from:<\/p>\n<ul>\n<li>a previous experiment. For example, comparing whether the mean weight of mice differs from 200 mg, a value determined in a previous study.<\/li>\n<li>or from an experiment where you have control and treatment conditions. If you express your data as \u201cpercent of control\u201d, you can test whether the average value of treatment condition differs significantly from 100.<\/li>\n<\/ul>\n<div class=\"error\">\n<p>Note that, the one-sample t-test can be used only, when the data are normally distributed. This can be checked using the Shapiro-Wilk test.<\/p>\n<\/div>\n<p>In this article, you will learn the <em>one-sample t-test formula<\/em>, as well as, how to :<\/p>\n<ul>\n<li><em>Calculate the one-sample t-test in R<\/em>. The pipe-friendly function <code>t_test()<\/code> [rstatix package] will be used.<\/li>\n<li><em>Check the one-sample t-test assumptions<\/em><\/li>\n<li><em>Calculate and report the one-sample t-test effect size<\/em> using <em>Cohen\u2019s d<\/em>. The <code>d<\/code> statistic redefines the difference in means as the number of standard deviations that separates those means. T-test conventional effect sizes, proposed by Cohen, are: 0.2 (small effect), 0.5 (moderate effect) and 0.8 (large effect) <span class=\"citation\">(Cohen 1998)<\/span>.<\/li>\n<\/ul>\n<p>Contents:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#prerequisites\">Prerequisites<\/a><\/li>\n<li><a href=\"#research-questions\">Research questions<\/a><\/li>\n<li><a href=\"#statistical-hypotheses\">Statistical hypotheses<\/a><\/li>\n<li><a href=\"#formula\">Formula<\/a><\/li>\n<li><a href=\"#demo-data\">Demo data<\/a><\/li>\n<li><a href=\"#summary-statistics\">Summary statistics<\/a><\/li>\n<li><a href=\"#visualization\">Visualization<\/a><\/li>\n<li><a href=\"#assumptions-and-preleminary-tests\">Assumptions and preleminary tests<\/a>\n<ul>\n<li><a href=\"#identify-outliers\">Identify outliers<\/a><\/li>\n<li><a href=\"#check-normality-assumption\">Check normality assumption<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#calculate-one-sample-t-test-in-r\">Calculate one-sample t-test in R<\/a><\/li>\n<li><a href=\"#effect-size\">Effect size<\/a><\/li>\n<li><a href=\"#report\">Report<\/a><\/li>\n<li><a href=\"#summary\">Summary<\/a><\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<\/ul>\n<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div class='dt-sc-ico-content type1'><div class='custom-icon' ><a href='https:\/\/www.datanovia.com\/en\/product\/practical-statistics-in-r-for-comparing-groups-numerical-variables\/' target='_blank'><span class='fa fa-book'><\/span><\/a><\/div><h4><a href='https:\/\/www.datanovia.com\/en\/product\/practical-statistics-in-r-for-comparing-groups-numerical-variables\/' target='_blank'> Related Book <\/a><\/h4>Practical Statistics in R II - Comparing Groups: Numerical Variables<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div id=\"prerequisites\" class=\"section level2\">\n<h2>Prerequisites<\/h2>\n<p>Make sure you have installed the following R packages:<\/p>\n<ul>\n<li><code>tidyverse<\/code> for data manipulation and visualization<\/li>\n<li><code>ggpubr<\/code> for creating easily publication ready plots<\/li>\n<li><code>rstatix<\/code> provides pipe-friendly R functions for easy statistical analyses.<\/li>\n<li><code>datarium<\/code>: contains required data sets for this chapter.<\/li>\n<\/ul>\n<p>Start by loading the following required packages:<\/p>\n<pre class=\"r\"><code>library(tidyverse)\r\nlibrary(ggpubr)\r\nlibrary(rstatix)<\/code><\/pre>\n<\/div>\n<div id=\"research-questions\" class=\"section level2\">\n<h2>Research questions<\/h2>\n<p>Typical research questions are:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>whether the mean (<span class=\"math inline\">\\(m\\)<\/span>) of the sample <em>is equal<\/em> to the theoretical mean (<span class=\"math inline\">\\(\\mu\\)<\/span>)?<\/li>\n<li>whether the mean (<span class=\"math inline\">\\(m\\)<\/span>) of the sample <em>is less than<\/em> the theoretical mean (<span class=\"math inline\">\\(\\mu\\)<\/span>)?<\/li>\n<li>whether the mean (<span class=\"math inline\">\\(m\\)<\/span>) of the sample <em>is greater than<\/em> the theoretical mean (<span class=\"math inline\">\\(\\mu\\)<\/span>)?<\/li>\n<\/ol>\n<\/div>\n<div id=\"statistical-hypotheses\" class=\"section level2\">\n<h2>Statistical hypotheses<\/h2>\n<p>In statistics, we can define the corresponding <em>null hypothesis<\/em> (<span class=\"math inline\">\\(H_0\\)<\/span>) as follow:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li><span class=\"math inline\">\\(H_0: m = \\mu\\)<\/span><\/li>\n<li><span class=\"math inline\">\\(H_0: m \\leq \\mu\\)<\/span><\/li>\n<li><span class=\"math inline\">\\(H_0: m \\geq \\mu\\)<\/span><\/li>\n<\/ol>\n<p>The corresponding <em>alternative hypotheses<\/em> (<span class=\"math inline\">\\(H_a\\)<\/span>) are as follow:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li><span class=\"math inline\">\\(H_a: m \\ne \\mu\\)<\/span> (different)<\/li>\n<li><span class=\"math inline\">\\(H_a: m &gt; \\mu\\)<\/span> (greater)<\/li>\n<li><span class=\"math inline\">\\(H_a: m &lt; \\mu\\)<\/span> (less)<\/li>\n<\/ol>\n<div class=\"notice\">\n<p>Note that:<\/p>\n<ul>\n<li>Hypotheses 1) are called <em>two-tailed tests<\/em><\/li>\n<li>Hypotheses 2) and 3) are called <em>one-tailed tests<\/em><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"formula\" class=\"section level2\">\n<h2>Formula<\/h2>\n<p>The the one-sample t-test formula can be written as follow:<\/p>\n<p><span class=\"math display\">\\[<br \/>\nt = \\frac{m-\\mu}{s\/\\sqrt{n}}<br \/>\n\\]<\/span><\/p>\n<p>where,<\/p>\n<ul>\n<li><span class=\"math inline\">\\(m\\)<\/span> is the sample mean<\/li>\n<li><span class=\"math inline\">\\(n\\)<\/span> is the sample size<\/li>\n<li><span class=\"math inline\">\\(s\\)<\/span> is the sample standard deviation with <span class=\"math inline\">\\(n-1\\)<\/span> degrees of freedom<\/li>\n<li><span class=\"math inline\">\\(\\mu\\)<\/span> is the theoretical mean<\/li>\n<\/ul>\n<p>The p-value, corresponding to the absolute value of the t-test statistics (|t|), is computed for the degrees of freedom (df): <code>df = n - 1<\/code>.<\/p>\n<p><strong>How to interpret the one-sample t-test results?<\/strong><\/p>\n<div class=\"success\">\n<p>If the p-value is inferior or equal to the significance level 0.05, we can reject the null hypothesis and accept the alternative hypothesis. In other words, we conclude that the sample mean is significantly different from the theoretical mean.<\/p>\n<\/div>\n<\/div>\n<div id=\"demo-data\" class=\"section level2\">\n<h2>Demo data<\/h2>\n<p>Demo dataset: <code>mice<\/code> [in datarium package]. Contains the weight of 10 mice:<\/p>\n<pre class=\"r\"><code># Load and inspect the data\r\ndata(mice, package = \"datarium\")\r\nhead(mice, 3)<\/code><\/pre>\n<pre><code>## # A tibble: 3 x 2\r\n##   name  weight\r\n##   &lt;chr&gt;  &lt;dbl&gt;\r\n## 1 M_1     18.9\r\n## 2 M_2     19.5\r\n## 3 M_3     23.1<\/code><\/pre>\n<\/div>\n<div id=\"summary-statistics\" class=\"section level2\">\n<h2>Summary statistics<\/h2>\n<p>Compute some summary statistics: count (number of subjects), mean and sd (standard deviation)<\/p>\n<pre class=\"r\"><code>mice %&gt;% get_summary_stats(weight, type = \"mean_sd\")<\/code><\/pre>\n<pre><code>## # A tibble: 1 x 4\r\n##   variable     n  mean    sd\r\n##   &lt;chr&gt;    &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;\r\n## 1 weight      10  20.1  1.90<\/code><\/pre>\n<\/div>\n<div id=\"visualization\" class=\"section level2\">\n<h2>Visualization<\/h2>\n<p>Create a boxplot to visualize the distribution of mice weights. Add also jittered points to show individual observations. The big dot represents the mean point.<\/p>\n<pre class=\"r\"><code>bxp &lt;- ggboxplot(\r\n  mice$weight, width = 0.5, add = c(\"mean\", \"jitter\"), \r\n  ylab = \"Weight (g)\", xlab = FALSE\r\n  )\r\nbxp<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-statistics-2-comparing-groups-means\/figures\/070-one-sample-t-test-box-plot-1.png\" width=\"364.8\" \/><\/p>\n<\/div>\n<div id=\"assumptions-and-preleminary-tests\" class=\"section level2\">\n<h2>Assumptions and preleminary tests<\/h2>\n<p>The one-sample t-test assumes the following characteristics about the data:<\/p>\n<ul>\n<li><strong>No significant outliers<\/strong> in the data<\/li>\n<li><strong>Normality<\/strong>. the data should be approximately normally distributed<\/li>\n<\/ul>\n<p>In this section, we\u2019ll perform some preliminary tests to check whether these assumptions are met.<\/p>\n<div id=\"identify-outliers\" class=\"section level3\">\n<h3>Identify outliers<\/h3>\n<p>Outliers can be easily identified using boxplot methods, implemented in the R function <code>identify_outliers()<\/code> [rstatix package].<\/p>\n<pre class=\"r\"><code>mice %&gt;% identify_outliers(weight)<\/code><\/pre>\n<pre><code>## [1] name       weight     is.outlier is.extreme\r\n## &lt;0 rows&gt; (or 0-length row.names)<\/code><\/pre>\n<div class=\"success\">\n<p>There were no extreme outliers.<\/p>\n<\/div>\n<div class=\"warning\">\n<p>Note that, in the situation where you have extreme outliers, this can be due to: 1) data entry errors, measurement errors or unusual values.<\/p>\n<p>In this case, you could consider running the non parametric Wilcoxon test.<\/p>\n<\/div>\n<\/div>\n<div id=\"check-normality-assumption\" class=\"section level3\">\n<h3>Check normality assumption<\/h3>\n<p>The normality assumption can be checked by computing the Shapiro-Wilk test. If the data is normally distributed, the p-value should be greater than 0.05.<\/p>\n<pre class=\"r\"><code>mice %&gt;% shapiro_test(weight)<\/code><\/pre>\n<pre><code>## # A tibble: 1 x 3\r\n##   variable statistic     p\r\n##   &lt;chr&gt;        &lt;dbl&gt; &lt;dbl&gt;\r\n## 1 weight       0.923 0.382<\/code><\/pre>\n<div class=\"success\">\n<p>From the output, the p-value is greater than the significance level 0.05 indicating that the distribution of the data are not significantly different from the normal distribution. In other words, we can assume the normality.<\/p>\n<\/div>\n<p>You can also create a QQ plot of the <code>weight<\/code> data. QQ plot draws the correlation between a given data and the normal distribution.<\/p>\n<pre class=\"r\"><code>ggqqplot(mice, x = \"weight\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-statistics-2-comparing-groups-means\/figures\/070-one-sample-t-test-qqplot-1.png\" width=\"288\" \/><\/p>\n<div class=\"success\">\n<p>All the points fall approximately along the (45-degree) reference line, for each group. So we can assume normality of the data.<\/p>\n<\/div>\n<div class=\"warning\">\n<p>Note that, if your sample size is greater than 50, the normal QQ plot is preferred because at larger sample sizes the Shapiro-Wilk test becomes very sensitive even to a minor deviation from normality.<\/p>\n<p>If the data are not normally distributed, it\u2019s recommended to use a non-parametric test such as the <em>one-sample Wilcoxon signed-rank test<\/em>. This test is similar to the one-sample t-test, but focuses on the median rather than the mean.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"calculate-one-sample-t-test-in-r\" class=\"section level2\">\n<h2>Calculate one-sample t-test in R<\/h2>\n<p>We want to know, whether the average weight of the mice differs from 25g (two-tailed test)?<\/p>\n<p>We\u2019ll use the pipe-friendly <code>t_test()<\/code> function [rstatix package], a wrapper around the R base function <code>t.test()<\/code>.<\/p>\n<pre class=\"r\"><code>stat.test &lt;- mice %&gt;% t_test(weight ~ 1, mu = 25)\r\nstat.test<\/code><\/pre>\n<pre><code>## # A tibble: 1 x 7\r\n##   .y.    group1 group2         n statistic    df       p\r\n## * &lt;chr&gt;  &lt;chr&gt;  &lt;chr&gt;      &lt;int&gt;     &lt;dbl&gt; &lt;dbl&gt;   &lt;dbl&gt;\r\n## 1 weight 1      null model    10     -8.10     9 0.00002<\/code><\/pre>\n<p>The results above show the following components:<\/p>\n<ul>\n<li><code>.y.<\/code>: the outcome variable used in the test.<\/li>\n<li><code>group1,group2<\/code>: generally, the compared groups in the pairwise tests. Here, we have null model (one-sample test).<\/li>\n<li><code>statistic<\/code>: test statistic (t-value) used to compute the p-value.<\/li>\n<li><code>df<\/code>: degrees of freedom.<\/li>\n<li><code>p<\/code>: p-value.<\/li>\n<\/ul>\n<div class=\"warning\">\n<p>You can obtain a detailed result by specifying the option <code>detailed = TRUE<\/code> in the function <code>t_test()<\/code>.<\/p>\n<\/div>\n<p>Note that:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>if you want to test whether the mean weight of mice is less than 25g (one-tailed test), type this:<\/li>\n<\/ol>\n<pre class=\"r\"><code>mice %&gt;% t_test(weight ~ 1, mu = 25, alternative = \"less\")<\/code><\/pre>\n<ol style=\"list-style-type: decimal;\" start=\"2\">\n<li>Or, if you want to test whether the mean weight of mice is greater than 25g (one-tailed test), type this:<\/li>\n<\/ol>\n<pre class=\"r\"><code>mice %&gt;% t_test(weight ~ 1, mu = 25, alternative = \"greater\")<\/code><\/pre>\n<p>To calculate t-test using the R base function, type this:<\/p>\n<pre class=\"r\"><code>t.test(mice$weight, mu = 25)<\/code><\/pre>\n<\/div>\n<div id=\"effect-size\" class=\"section level2\">\n<h2>Effect size<\/h2>\n<p>To calculate an effect size, called <code>Cohen's d<\/code>, for the one-sample t-test you need to divide the mean difference by the standard deviation of the difference, as shown below. Note that, here: <code>sd(x-mu) = sd(x)<\/code>.<\/p>\n<p><strong>Cohen\u2019s d formula<\/strong>:<\/p>\n<p><span class=\"math display\">\\[<br \/>\nd = \\frac{m-\\mu}{s}<br \/>\n\\]<\/span><\/p>\n<ul>\n<li><span class=\"math inline\">\\(m\\)<\/span> is the sample mean<\/li>\n<li><span class=\"math inline\">\\(s\\)<\/span> is the sample standard deviation with <span class=\"math inline\">\\(n-1\\)<\/span> degrees of freedom<\/li>\n<li><span class=\"math inline\">\\(\\mu\\)<\/span> is the theoretical mean against which the mean of our sample is compared (default value is mu = 0).<\/li>\n<\/ul>\n<p><strong>Calculation<\/strong>:<\/p>\n<pre class=\"r\"><code>mice %&gt;% cohens_d(weight ~ 1, mu = 25)<\/code><\/pre>\n<pre><code>## # A tibble: 1 x 6\r\n##   .y.    group1 group2     effsize     n magnitude\r\n## * &lt;chr&gt;  &lt;chr&gt;  &lt;chr&gt;        &lt;dbl&gt; &lt;int&gt; &lt;ord&gt;    \r\n## 1 weight 1      null model    10.6    10 large<\/code><\/pre>\n<div class=\"success\">\n<p>Recall that, t-test conventional effect sizes, proposed by Cohen J. (1998), are: 0.2 (small effect), 0.5 (moderate effect) and 0.8 (large effect) (Cohen 1998). As the effect size, d, is 2.56 you can conclude that there is a large effect.<\/p>\n<\/div>\n<\/div>\n<div id=\"report\" class=\"section level2\">\n<h2>Report<\/h2>\n<p>We could report the result as follow:<\/p>\n<p>A one-sample t-test was computed to determine whether the recruited mice average weight was different to the population normal mean weight (25g).<\/p>\n<p>The mice weight value were normally distributed, as assessed by Shapiro-Wilk\u2019s test (p &gt; 0.05) and there were no extreme outliers in the data, as assessed by boxplot method.<\/p>\n<p>The measured mice mean weight (20.14 +\/- 1.94) was statistically significantly lower than the population normal mean weight 25 (<code>t(9) = -8.1, p &lt; 0.0001, d = 2.56<\/code>); where t(9) is shorthand notation for a t-statistic that has 9 degrees of freedom.<\/p>\n<p>Create a box plot with p-value:<\/p>\n<pre class=\"r\"><code>bxp + labs(\r\n  subtitle = get_test_label(stat.test, detailed = TRUE)\r\n  )<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-statistics-2-comparing-groups-means\/figures\/070-one-sample-t-test-one-sample-box-plot-with-p-value-1.png\" width=\"336\" \/><\/p>\n<p>Create a density plot with p-value:<\/p>\n<ul>\n<li>Red line corresponds to the observed mean<\/li>\n<li>Blue line corresponds to the theoretical mean<\/li>\n<\/ul>\n<pre class=\"r\"><code>ggdensity(mice, x = \"weight\", rug = TRUE, fill = \"lightgray\") +\r\n  scale_x_continuous(limits = c(15, 27)) +\r\n  stat_central_tendency(type = \"mean\", color = \"red\", linetype = \"dashed\") +\r\n  geom_vline(xintercept = 25, color = \"blue\", linetype = \"dashed\") + \r\n  labs(subtitle = get_test_label(stat.test,  detailed = TRUE))<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-statistics-2-comparing-groups-means\/figures\/070-one-sample-t-test-one-sample-density-with-p-value-1.png\" width=\"384\" \/><\/p>\n<\/div>\n<div id=\"summary\" class=\"section level2\">\n<h2>Summary<\/h2>\n<p>This article describes the basics and the formula of the on-sample t-test. Additionally, it provides an example for:<\/p>\n<ul>\n<li>checking the on-sample t-test assumptions,<\/li>\n<li>calculating the one-sample t-test in R using the <code>t_test()<\/code> function [rstatix package],<\/li>\n<li>computing Cohen\u2019s d for one-sample t-test<\/li>\n<li>Interpreting and reporting the results<\/li>\n<\/ul>\n<\/div>\n<div id=\"references\" class=\"section level2 unnumbered\">\n<h2>References<\/h2>\n<div id=\"refs\" class=\"references\">\n<div id=\"ref-cohen1998\">\n<p>Cohen, J. 1998. <em>Statistical Power Analysis for the Behavioral Sciences<\/em>. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen&#8217;s d, interpretation and reporting in R.<\/p>\n","protected":false},"author":1,"featured_media":9086,"parent":11648,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","class_list":["post-11649","dt_lessons","type-dt_lessons","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>One Sample T-Test : Excellent Complete Reference - Datanovia<\/title>\n<meta name=\"description\" content=\"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen&#039;s d, interpretation and reporting in R.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"One Sample T-Test : Excellent Complete Reference - Datanovia\" \/>\n<meta property=\"og:description\" content=\"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen&#039;s d, interpretation and reporting in R.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-25T10:15:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/\",\"name\":\"One Sample T-Test : Excellent Complete Reference - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg\",\"datePublished\":\"2019-12-25T10:14:56+00:00\",\"dateModified\":\"2019-12-25T10:15:33+00:00\",\"description\":\"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen's d, interpretation and reporting in R.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lessons\",\"item\":\"https:\/\/www.datanovia.com\/en\/lessons\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Types of T-Test\",\"item\":\"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"One Sample T-Test\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"name\":\"Datanovia\",\"description\":\"Data Mining and Statistics for Decision Support\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"One Sample T-Test : Excellent Complete Reference - Datanovia","description":"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen's d, interpretation and reporting in R.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/","og_locale":"en_US","og_type":"article","og_title":"One Sample T-Test : Excellent Complete Reference - Datanovia","og_description":"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen's d, interpretation and reporting in R.","og_url":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/","og_site_name":"Datanovia","article_modified_time":"2019-12-25T10:15:33+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/","url":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/","name":"One Sample T-Test : Excellent Complete Reference - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg","datePublished":"2019-12-25T10:14:56+00:00","dateModified":"2019-12-25T10:15:33+00:00","description":"Describes the one-sample t-test, which is used to compare the mean of one sample to a known standard (or theoretical \/ hypothetical) mean. You will learn the formula, assumptions, calculation, visualization, effect size measure using the Cohen's d, interpretation and reporting in R.","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26992504_573128703027078_1836520800078284181_n.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/one-sample-t-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/"},{"@type":"ListItem","position":2,"name":"Lessons","item":"https:\/\/www.datanovia.com\/en\/lessons\/"},{"@type":"ListItem","position":3,"name":"Types of T-Test","item":"https:\/\/www.datanovia.com\/en\/lessons\/types-of-t-test\/"},{"@type":"ListItem","position":4,"name":"One Sample T-Test"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/#website","url":"https:\/\/www.datanovia.com\/en\/","name":"Datanovia","description":"Data Mining and Statistics for Decision Support","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/"}}]}},"multi-rating":{"mr_rating_results":[]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/types\/dt_lessons"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/comments?post=11649"}],"version-history":[{"count":0,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11649\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media\/9086"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media?parent=11649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}