Question

In: Statistics and Probability

STAT101 PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2 225 58...

STAT101
PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2
225 58 Male Offaly Low 178.2 103.5 AB N N Placebo 6.1 4.6
226 61 Male Carlow Medium 173.9 63 AB Y N Control 2.2 5.7
227 57 Female Donegal Medium 160.9 76.1 B N Y Control 5.8 5
228 43 Male Offaly High 175 83.7 AB Y N Control 3.6 2.4
229 37 Female Longford Low 156.8 68 B N Y Control 4.9 6
230 29 Male Leitrim Medium 165.1 79.1 A Y Y Placebo 3.5 5.3
231 52 Male Cavan Low 166.6 60.4 A Y Y Placebo 2.9 4
232 47 Female Westmeath Low 166.8 63.6 B N Y Control 4 3.2
233 28 Male Wicklow Low 171.5 67.2 O Y N Control 4.2 4

Q1

The commands for these questions using rstudio

a. How many patients are in each of the Control and Placebo groups?

b. Provide a histogram and describe the distribution of age groups in your data.

c. Body Mass Index (BMI) is defined as kg/m2 where kg is the individual’s weight in kilograms and m

is the individual’s height in metres. Provide a histogram and describe the distribution of BMI in the

whole sample. Calculate the sample mean BMI of both males and females.

d. Identify the counties with the highest and lowest mean weights.

e. Compute how many females in the sample belong to Blood Group O.

f. What percentage of men belong to Blood Group B?

g. Calculate the mean difference in each subject’s cholesterol level from the start to the end of the study.

(Hint: create a new variable choldiff.)

Solutions

Expert Solution

R codes and output:

> d=read.table('data1.csv',header=T,sep=',')
> head(d)
PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke
1 225 58 Male Offaly Low 178.2 103.5 AB N
2 226 61 Male Carlow Medium 173.9 63.0 AB Y
3 227 57 Female Donegal Medium 160.9 76.1 B N
4 228 43 Male Offaly High 175.0 83.7 AB Y
5 229 37 Female Longford Low 156.8 68.0 B N
6 230 29 Male Leitrim Medium 165.1 79.1 A Y
RegularEx Group Cholesterol1 Cholesterol2
1 N Placebo 6.1 4.6
2 N Control 2.2 5.7
3 Y Control 5.8 5.0
4 N Control 3.6 2.4
5 Y Control 4.9 6.0
6 Y Placebo 3.5 5.3
> attach(d)
The following objects are masked from d (pos = 3):

Age, BloodGroup, CardioRisk, Cholesterol1, Cholesterol2, County,
Group, Height, PatientID, RegularEx, Sex, Stroke, Weight

Que.a

> length(which(Group=='Placebo'))
[1] 3
> length(which(Group=='Control'))
[1] 6

3 patients in placebo group and 6 patients in control group.

Que.b

> hist(Age)

Que.c

> BMI = round(Weight/(Height)^2,4)
> hist(BMI)
> a=cbind(Sex, BMI)
> a
Sex BMI   
[1,] "Male" "0.0033"
[2,] "Male" "0.0021"
[3,] "Female" "0.0029"
[4,] "Male" "0.0027"
[5,] "Female" "0.0028"
[6,] "Male" "0.0029"
[7,] "Male" "0.0022"
[8,] "Female" "0.0023"
[9,] "Male" "0.0023"
> bmi_m = BMI[which(Sex=='Male')];bmi_m
[1] 0.0033 0.0021 0.0027 0.0029 0.0022 0.0023
> bmi_f = BMI[which(Sex=='Female')];bmi_f
[1] 0.0029 0.0028 0.0023
> mean(bmi_m)
[1] 0.002583333
> mean(bmi_f)
[1] 0.002666667

Histogram:

Sample mean BMI for male =  0.00258

Sample mean BMI for female = 0.00267

Que.e

> length(which(Sex=='Female' & BloodGroup == 'O' ))
[1] 0

There are zero females in the sample belong to Blood Group O.

Que.f

> length(which(Sex=='Male' & BloodGroup == 'B' ))
[1] 0


There are zero males in the sample belong to Blood Group B. Hence percentage is zero.

Que.g

> choldiff= Cholesterol2 - Cholesterol1
> mean(choldiff)
[1] 0.3333333

The mean difference in each subject’s cholesterol level from the start to the end of the study is 0.3333


Related Solutions

STAT PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2 225 58...
STAT PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2 225 58 Male Offaly Low 179.2 103.5 AB N N Placebo 6.1 4.6 226 61 Male Carlow Medium 174.9 63 AB Y N Control 2.2 5.7 227 57 Female Donegal Medium 161.9 76.1 B N Y Control 5.8 5 228 43 Male Offaly High 176 83.7 AB Y N Control 3.6 2.4 229 37 Female Longford Low 157.8 68 B N Y Control 4.9 6 230...
STAT PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2 225 58...
STAT PatientID Age Sex County CardioRisk Height Weight BloodGroup Stroke RegularEx Group Cholesterol1 Cholesterol2 225 58 Male Offaly Low 179.2 103.5 AB N N Placebo 6.1 4.6 226 61 Male Carlow Medium 174.9 63 AB Y N Control 2.2 5.7 227 57 Female Donegal Medium 161.9 76.1 B N Y Control 5.8 5 228 43 Male Offaly High 176 83.7 AB Y N Control 3.6 2.4 229 37 Female Longford Low 157.8 68 B N Y Control 4.9 6 230...
Clinical Note Age     58             Sex           M        Date Chief com
Clinical Note Age     58             Sex           M        Date Chief complaint "Pain on my chest" on and off for the past six months. History of present illness Mr. Solomon is a 58 year old insurance broker who presents tonight in the office following an episode of "chest pain" that he experienced earlier in the day during a golf game. Although he minimizes the severity of the pain and attributes it to being "out of shape," his wife insisted that he see a physician because he...
Client Age: 24 Height: 5’8” Weight: 109 lbs Sex: Female Race: White Family History This client...
Client Age: 24 Height: 5’8” Weight: 109 lbs Sex: Female Race: White Family History This client has no family history of cardiovascular disease. Medical History Present Conditions This woman’s resting heart rate (HR) is 65 bpm, and her resting blood pressure (BP) is 104/62 mmHg. She has a total cholesterol of 220 mg/dl. Her high-density lipoprotein (HDL) level is 45 mg/dl and triglycerides are 120 mg/dl. She recently had a maximal oxygen consumption test that indicates her VO2max is 48...
Patient Height is 5’5 weight:165lbs Age:70 sex: Female Code status: full code ​Braden Score: 22 Admitting...
Patient Height is 5’5 weight:165lbs Age:70 sex: Female Code status: full code ​Braden Score: 22 Admitting Diagnosis: R/O Ketoacidosis Chief Complaint: Weakness, thirsty, lethargy PMHx: NIDDM, Hypothyroidism, Hypertension PSHx: None ​ ​ ​Allergies: ACE Inhibitors, Penicillin Home Medications: Metformin 1000mg po twice daily with meals Levothyroxine 0.12 micrograms po once daily Losartan 100mg po once daily ​​​​​ Glasses: None    Upper partial dentures Vital Signs: 101.3°F, 100 apical pulse , Respirations 28, Blood Pressure 161/90, SaO2 – 94% ,Pain: none Hematology...
You are given a data set containing the height, weight, age, and blood pressure of a...
You are given a data set containing the height, weight, age, and blood pressure of a representative sample of people from a major metropolitan area. Comment on the suitability of using a statistically-based versus a cluster-based outlier detection scheme to identify people with anomalous characteristics for this data set.   
A pregnant female of age 38 years, her weight is 80 Kg and her height is...
A pregnant female of age 38 years, her weight is 80 Kg and her height is 160 cm, was admitted to hospital due to unknown reason high temperature 38 ºC, she had symptoms like night sweat, general weakness, weight loss of unknown reason, also non- itchy spots on her neck. The physician advised her to admit hospital for more investigations as she is pregnant in the 3rd trimester, after blood test, WBC count was 3500 /mm3 and Hb was 9...
Patients Profile Name: Patient James Age: 58 years old Sex: Male Nationality: Filipino Religion: Roman Catholic...
Patients Profile Name: Patient James Age: 58 years old Sex: Male Nationality: Filipino Religion: Roman Catholic Address: Quezon City Marital Status: Single Chief Complaints: “Sumasakit and dibdib ko. Nawawala pero pabalikbalik. Mga anim na buwan na na ganito and nararamdaman ko” (“Pain on my chest” on and off for the past six months”.) Admitting Diagnosis: Angina Pectoris History of Present Illness             Mr. James is a 58 year old insurance broker who seeks consultation to FUMC due to an episode...
Compare the height, weight (in inches), and age for Eagles versus Patriots, using t tests. Provide...
Compare the height, weight (in inches), and age for Eagles versus Patriots, using t tests. Provide the conclusions based on the t tests. Eagles Age Height (") 35 66    28 69    69    23 69    23 69    29 69    23 70    24 70    31 70    28 70    24 70    24 71    24 71    26 71    31 71    23 71    26 71    25 72    25 72    31 72    29 72    33 72    30 72    22 72    28 72    23 72    24 72   ...
There are two variables in this data set. Variable Definition Height Height in inches Weight Weight...
There are two variables in this data set. Variable Definition Height Height in inches Weight Weight in pounds Using Excel, compute the standard deviation and variance (both biased and unbiased) for height and weight. Height weight 53 156 46 131 54 123 44 142 56 156 76 171 87 143 65 135 45 138 44 114 57 154 68 166 65 153 66 140 54 143 66 156 51 173 58 143 49 161 48 131
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT