One-sample analysis

As surprising as it seems, one does not need more than a single sample to perform statistical analysis! One-sample analysis allows you to compare the known mean of a large population to the mean of a specific subpopulation or sample. This means that you may check whether a limited group of individuals exhibits the same “properties” as the population they originate from.

Skjermbilde 2016-06-13 10.54.14
Sometimes, you are just curious to know whether a sample is normally distributed. Sometimes, you NEED to know whether it is or not because normality is a prerequisite for performing a specific test. To check whether your sample is normally distributed, you may use shapiro.test() which performs the Shapiro-Wilks normality test. In […]

Test for normality – Shapiro-Wilks test

Two rather similar tests are available to us: the one-sample z-test and the one-sample t-test. You shall choose one of them, depending on a handful of factors such as, for example, the normality of the population, the number n of observations or whether the standard deviation of the population is […]

2. Choose a one-sample test!

With regards to t-test, the function t.test() in R may be used. This is a rather simple function which performs both one- and two-sample t-tests (it is thus likely that we will meet that function elsewhere in bioST@TS). Assuming that you have stored your sample data in the variable data, […]

3. Run a one-sample t-test.

With regards to z-test, there is NO z.test() function in R, unfortunately. However, the package TeachingDemos contains a z.test() function which will be helpful. You must install and load the TeachingDemos package in the same manner as you previously installed pastecs (see here). Assuming that you have stored your sample data in […]

4. Run a one-sample z-test.

So, what about our university teacher and his bunch of clever students? First, let’s check what is known about the sample: List of the things you should know: the mean/reference of the population, µ (here µ=120) the number of observations in your sample, n (here n=40) the sample mean, M […]

5. So, what about our example?