coachsetr.blogg.se

T.test in r studio
T.test in r studio








t.test in r studio

Therefore, in this study the continuous dependent variable is cholesterol concentration and the categorical (dichotomous) independent variable is exercise trial, which has two groups: " exercise" and " control". To determine whether cardiovascular health had improved as a result of the exercise intervention, the researcher ran an independent-samples t-test to determine whether there was a statistically significant difference in mean cholesterol concentration between the exercise group and the control group.

t.test in r studio

Note: To ensure that the assumption of independence of observations was met, as discussed earlier, participants could only be in one of these two groups and the two groups did not have any contact with each other. After 6 months, the cholesterol concentration of participants (in mmol/L) was measured in the exercise group and the control group.

t.test in r studio

This group was called the " control" group. The other group continued with their typical daily activities (i.e., they remained "sedentary"). This experimental group was called the " exercise" group. One group underwent an exercise intervention where participants took part in a 6-month exercise programme consisting of four 1-hour exercise sessions per week. These 21 participants were randomly assigned to one of two groups. In this fictitious study, the researcher recruited 21 participants who were classified as being " sedentary" (i.e., they engaged in only low daily activity and did not exercise). For example, a cholesterol concentration of 3.57 mmol/L would be associated with better cardiovascular health compared to a cholesterol concentration of 6.04 mmol/L. One measure of cardiovascular health is the concentration of cholesterol in the blood, measured in mmol/L, where lower cholesterol concentrations are associated with improved cardiovascular health. R and RStudio ExampleĪ researcher wanted to know whether exercise could improve a person’s cardiovascular health. Therefore, start by reading the example we use throughout this introductory guide in the next section.

#T.test in r studio how to

On this page, we set out the example we use to illustrate how to carry out an independent-samples t-test using R, before showing how to set up your data using Microsoft Excel, R and RStudio. On the previous page you learnt about the type of research where an independent-samples t-test can be used and the critical assumptions of the independent-samples t-test that your study design, variables and data must meet in order for the independent-samples t-test to be the correct statistical test for your analysis. Independent-samples t-test using R, Excel and RStudio (page 2)










T.test in r studio