One sample t test and two Independent sample t test

12 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€64.96
List Price:  €92.81
You save:  €27.84
£55.77
List Price:  £79.68
You save:  £23.90
CA$95.68
List Price:  CA$136.70
You save:  CA$41.01
A$106.02
List Price:  A$151.47
You save:  A$45.44
S$94.41
List Price:  S$134.88
You save:  S$40.47
HK$546.80
List Price:  HK$781.18
You save:  HK$234.37
CHF 63.34
List Price:  CHF 90.49
You save:  CHF 27.15
NOK kr761.11
List Price:  NOK kr1,087.35
You save:  NOK kr326.23
DKK kr485.02
List Price:  DKK kr692.92
You save:  DKK kr207.89
NZ$116.42
List Price:  NZ$166.33
You save:  NZ$49.90
د.إ257.06
List Price:  د.إ367.25
You save:  د.إ110.18
৳7,660.01
List Price:  ৳10,943.35
You save:  ৳3,283.33
₹5,835.78
List Price:  ₹8,337.18
You save:  ₹2,501.40
RM331.75
List Price:  RM473.95
You save:  RM142.20
₦86,437.65
List Price:  ₦123,487.65
You save:  ₦37,050
₨19,416.31
List Price:  ₨27,738.77
You save:  ₨8,322.46
฿2,572.74
List Price:  ฿3,675.50
You save:  ฿1,102.76
₺2,264.43
List Price:  ₺3,235.04
You save:  ₺970.61
B$356.70
List Price:  B$509.60
You save:  B$152.89
R1,295.44
List Price:  R1,850.72
You save:  R555.27
Лв127.05
List Price:  Лв181.51
You save:  Лв54.46
₩94,909.58
List Price:  ₩135,590.93
You save:  ₩40,681.35
₪259.50
List Price:  ₪370.74
You save:  ₪111.23
₱3,993.87
List Price:  ₱5,705.78
You save:  ₱1,711.90
¥10,712.31
List Price:  ¥15,303.96
You save:  ¥4,591.65
MX$1,187.89
List Price:  MX$1,697.07
You save:  MX$509.17
QR254.57
List Price:  QR363.69
You save:  QR109.12
P950.82
List Price:  P1,358.38
You save:  P407.55
KSh9,247.76
List Price:  KSh13,211.65
You save:  KSh3,963.89
E£3,352.12
List Price:  E£4,788.95
You save:  E£1,436.83
ብር4,006.43
List Price:  ብር5,723.72
You save:  ብር1,717.28
Kz58,511.64
List Price:  Kz83,591.64
You save:  Kz25,080
CLP$65,950.47
List Price:  CLP$94,219
You save:  CLP$28,268.52
CN¥506.53
List Price:  CN¥723.64
You save:  CN¥217.11
RD$4,055.76
List Price:  RD$5,794.19
You save:  RD$1,738.43
DA9,420.16
List Price:  DA13,457.95
You save:  DA4,037.79
FJ$157.70
List Price:  FJ$225.30
You save:  FJ$67.59
Q542.52
List Price:  Q775.06
You save:  Q232.54
GY$14,601.52
List Price:  GY$20,860.22
You save:  GY$6,258.69
ISK kr9,764.23
List Price:  ISK kr13,949.49
You save:  ISK kr4,185.26
DH703.98
List Price:  DH1,005.73
You save:  DH301.75
L1,236.34
List Price:  L1,766.28
You save:  L529.93
ден3,998.59
List Price:  ден5,712.52
You save:  ден1,713.92
MOP$561.77
List Price:  MOP$802.57
You save:  MOP$240.79
N$1,291.99
List Price:  N$1,845.78
You save:  N$553.78
C$2,569.36
List Price:  C$3,670.67
You save:  C$1,101.31
रु9,319.09
List Price:  रु13,313.56
You save:  रु3,994.46
S/260.54
List Price:  S/372.22
You save:  S/111.67
K269.79
List Price:  K385.44
You save:  K115.64
SAR262.50
List Price:  SAR375.02
You save:  SAR112.51
ZK1,882.68
List Price:  ZK2,689.66
You save:  ZK806.98
L323.40
List Price:  L462.03
You save:  L138.62
Kč1,628.77
List Price:  Kč2,326.92
You save:  Kč698.14
Ft25,305.79
List Price:  Ft36,152.68
You save:  Ft10,846.88
SEK kr755.02
List Price:  SEK kr1,078.64
You save:  SEK kr323.62
ARS$61,468.17
List Price:  ARS$87,815.44
You save:  ARS$26,347.26
Bs483.33
List Price:  Bs690.51
You save:  Bs207.17
COP$271,845.87
List Price:  COP$388,367.89
You save:  COP$116,522.02
₡35,672.25
List Price:  ₡50,962.55
You save:  ₡15,290.29
L1,724.16
List Price:  L2,463.20
You save:  L739.03
₲522,510.75
List Price:  ₲746,475.93
You save:  ₲223,965.17
$U2,674.97
List Price:  $U3,821.56
You save:  $U1,146.58
zł281.37
List Price:  zł401.98
You save:  zł120.60
Already have an account? Log In

Transcript

Welcome to clinical data management programs using SAS. In this video we'll be discussing about how to perform different testing of hypothesis. So we'll be doing one sample t test, two independent sample t test, paired sample t test and chi square test for independence of activities you need to know whatever test your hypothesis or whatever test we are going to perform all our parametric tests. So there is a slight difference between the parametric tests and nonparametric tests. first segment is cursed with your water parametric tests. parametric tests are those tests which are based on the following assumptions first, your data has to be normally distributed.

Second, the variance of the data should be homogeneous that is the data should be of same type that should be less amount of heterogeneity interval data the data should be measured at equal intervals and the values within the data the data values should be independent of each other that is, they should not get influenced by each other. So these are the assumptions of your parametric tests. And when we talk about what are nonparametric tests, not nonparametric tests are the tests which visibility's with ordinal data where data can be ranked in a particular order. Those are first nonparametric tests, but we are going to work with only parametric tests. And I have already discussed the assumptions with all the assumptions of parametric tests. Now, let's start with first the one sample t test.

Now, what is the concept of one sample t test in one set procedures, you have got a defined value or a defined mean or we also call it a call it as an historic mean, where our null hypothesis is my muse equal to a historic mean, and alternative hypotheses mu is not equal to the historic mean. So let me explain to you all the concept of uncertainty test with a particular case study. We'll be doing one sample t test in SAS now so we'll be in order to do that we'll be using a case study. So let me explain you the concept of one sample t test using a particular case study so this is the case study for one sample t test. See the apple hospitals group is the pioneer of integrated healthcare delivery in India. The company has presence across all the Major cities in India, checking that pressure is a regular activity in hospitals that base train heartrate is the heart rate at which someone's heart beats.

Without any stresses affecting him. It says relaxed everyday heart rate. Historically, it has been seen that the average baseline blood pressure of the individuals admitted into the hospital as 96. Yesterday 60 patients were admitted across various hospitals throughout the country. Now doctors are considering whether their belief about the average baseline blood pressure still holds true or not in the light of new evidence. So basically, I want to test whether the average patient doctor of the patient is 60 or not average doctor issue the 60 patients whether it is 96 or not, so my H naught is equal to 96.

And my h1 is new not equal to 96. So it's not as may not hypothesis and h1 is my alternative hypothesis. I will be accepting my nan hypothesis with my P value is greater than but level of significance. So let me explain this using SAS. So first, we'll be importing our raw data file. For that we'll be using the procedure called proc proc import.

Data file. Equals we'll give the path where our data is present. This is the name of a file, one sample t test, and this could be P dot CSV something the name of the file. I'll be equal to one underscore sample, then we are doing replace, and then drop. So let's run this code This has me one sample t test data. It consists of subject the patient subjects that is patient ID you can see their age and their baseline BP.

So I'm basically going to check whether the average base NDP is 96 or not. So my age not not hypothesis me will call to 96 an h1 or alternative hypothesis news not equal to 96. So now let's do one sample t test we'll be using the procedure called proc t test data equals my data which I imported one sample t test underscore BP dot CSV after importing that in SAS, the name of the data is one underscore sample. So here just because we have created the data set inside work, so I need not mention the library name I can just write work I can just write the dataset name that is one underscore sample. Then I have to give the historic mean that is h not that is equal to 96. Then alpha alpha is my level of significance of the level of sales begins which is 0.05.

In SAS by default level of significance is 5% only, but in case of unsampled details we have to mention a specified level of significance we have specified it as 0.05 then I have to specify my analytical variable by analytical analysis variable is based in BP it is I'm going to work with blood pressure variable so I'm copying this variable from here variable name semicolon and then run Varghese, NDP semicolon and run. So, let me explain all this code, I have executed the t test procedure on the data set called one sample, women historic mini scientifics. So, they are taking new product and this is h naught alpha, the level of significance is 5%, which is by default in SAS set as 5%. But we have to specify the value of alpha in case of T test or in case of we can see in case of one sample t test then we have specified the analysis variable analytical variable using the value And then we are executing the code, then we are doing run.

So let's run this code. So, this is my reserved keyword. So, see here my P value 0.2686 that is it is greater than 0.05. If my P value is greater than the level of significance that is 0.05, then I will accept the null hypothesis to here I've accepted the null hypothesis that is the baseline blood pressure, the average baseline pressure of this patient is 96. So our assumption about the historic mean that is new couldn't anticipate is true, because we have to accept the null hypothesis as a p value is greater than the level of significance that is 0.0. Now let's move to the concept of two independent sample t test.

What do you mean by two independent sample t test? two independent sample t test means that we are comparing the means of two samples which are drawn from the same population. So let me give you all the concept of two independent sample t test within case study. We'll be doing two independent sample t test with the case study. Suppose there are two passes from on medicines X, Y, Z and ABC from two different brands, which medicine is effective in terms of processing time. So, basically suppose there are two types of paracetamol medicines of two different brands, and these medicines are given to a couple of patients and their processing time is seen that how much time each medicine is taking is creating impact on the how much time it is taking to create impact on the patient.

So, whichever medicine is taking less amount of time that it is that means that that particular medicine is working better than the other medicine. But you just see the the two medicines X, Y, Z and ABC they're two different samples. But both are parasitic on medicines. That means they are though they're from two different brands, but they are not from the same population. So, we have two independent sample t tests we must always remember that the variance should be homogeneous that is the sample should be drawn from the same population. So, do a test called folded f test, where we check the equality of variances.

If though, and then after checking for equality of variances, we do the two independent sample t test. So in this case, again, I'm going to import the data. First, I'm going to import the data for two independent sample t test. So I'm using the procedure called proc input data file. equals, within double quotes, I'm going to give the path This is mean a multimeter. Then we'll do H naught out equals to two underscore sample replace and then Let's run.

So let's run this code. This is meant to sample data. See there are two types of medicines express it in ABC. And the processing time it takes for each of the medicine exercises or ABC on a particular patient is given now we will be comparing that which medicine is working better in terms of the processing time. So, for that, we will do again use the same procedure called proc t test data equals to underscore sample. My categorical variable over here is the medicine tablets.

So, I'm going to use a keyword called class because class keyword is used to define the categorical variable class. Then let's specify the name of the variable that is medicine tablets. Then my analysis variable is the processing time. So we have to specify the analysis variable using var statement that is processing time in minutes. And then after that we have given run and then quit. So let me explain you all the code is basically I'm going to run the t test procedure on the two sample data.

My class is a keyword to define the categorical variable. So medicine term tablets is the categorical variable. And specifying medicine tablets with respect to the class statement, and processing time in minutes is the analysis variable. That's where I've specified the analysis variables in the var statement. So class class keyword is to specify the categorical variable var is to specify an analytical variable and then run and then quit. Let's run this code.

So you can see that first the equal to variances test is done, which is 0.30. So that means you know the default level of significance in SAS is 0.05. So just because the p value is greater than the level of significance, so, I will accept the null hypothesis of my folded f test where the null hypothesis is the variance is homogeneous that is the data is drawn or the samples are drawn from the same population. So, here the samples are drawn from the same population so the variance is homogeneous now we'll be checking the p value for the pooled variances because the variances are equal. So my P value is 0.0595. Again it is greater than 0.05.

So here I will accept the null hypothesis that is the mean or we can say the the mean processing time for both the tablets are approximately same here we can actually see the mean there slight difference the ABC mean is 40.233 and express it means 36.80. So basically express it is taking less amount of time compared to ABC in terms of processing time. If you compare this mean then XYZ it is working better in terms of ABC in terms of processing time. So in this video we'll be doing here in Macomb in video I will be discussing with you all the concept of paired sample t test and chi square test independence for attributes. Thank you. Goodbye.

See you all for the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.