Question: Inside your array, add new columns and then populate them by modifying your INSERT INTO or UPDATE SET statements. We are creating columns of analytics

Inside your array, add new columns and then populate them by modifying your INSERT INTO or
UPDATE SET statements. We are creating columns of analytics that can be used to build
interesting charts to answer the following medical concerns:
1. You should now have a column of the actual
heartrate from a treadmill test, and a column
of what the maximum heartrate should have
been when exercising (.85* the # in the image
to the right, for each age group).
Now lets analyze the subjects of the study
categorizing the subjects based on their
treadmill test. Create a new column in your
array that holds text. USE CASE() to write a
new metric that puts subjects into groups
based on their actual max heart rate on the
treadmill test as compared to the max their
age group. For example if the max heart rate
for a 30 year old is 161, then you could put
people into groups based on their treadmill
test such as:
a) reached or exceeded max heartrate (these are the subjects that should walk more often)
b) reached 90% of max heart rate
c) reached 70% of max heart rate
d) reached only 50% of max heart rate on treadmill test (these are the really healthy subjects,
walking on a treadmill did not spike their heart rate, because they are accustomed to the
activity).
2. One of the medical directors read a study that reported that better than BMI, the simple
metric of weight in pounds divided by height in inches yields a very accurate predictor of
health. You are asked to create this Weight/Height metric. Do some analysis, comparing this
metric to the groupings on the treadmill test
a) First create this new metric as a continuous variable, saving it to a new array column
(numeric).
b) To create categories based on the Weight/height metric add another new column to your
array (text based), then use a case statement to break this variable into categories of your own
3
design. You could then use these groups in a stacked column chart (added to the legend) or as
the rows or columns in
c) To further analyze subjects add another new column to your array (numeric). Alter your
INSERT INTO statement to load this new column with the results of an NTILE(4) statement (that
pulls the columns from the database) to create quartiles based on this metric. We need to
check if the quartiles based on this health predictor are more insightful than the groups that we
made with the CASE statement. Note: place the NTILE statement within the INSERT INTO
@Array SELECT statement.
d) Analyze the data using these metrics and categories, and provide your analysis. Please do not
complete this assignment in one sitting, rather give some thought to your analysis and insights.
The difference between the grades B and an A is depth and insight. Try to make some
inferences based on the available data, such as people in group 1 of the weight/height metric
did the best on the treadmill test, and subjects in group 4 of the height/weight metric did the
worst on the treadmill test).
3. The medical directors at the clinic are questioning the predictive validity of the treadmill
stress test to identify subjects that are at risk for heart conditions. The treadmill stress test
requires subjects get on a treadmill and walk until their heartrate peaks and they need to stop.
According to conventional wisdom when the subjects peak heart rate is more than 85% of the
average maximum heart rate for their age group, then a blockage may be occurring in the
subjects heart.
a) Create a column of your own design that categorizes the subjects into groups based on their
treadmill results. Perform some research into the dataset using these categories.
b) finally use an NTILE(4) statement to create quartiles based on this metric. Perform some
research into the dataset using these categories. Note: place the NTILE statement within the
INSERT INTO @Array SELECT statement.
e) Analyze the data using these metrics and categories, and provide your analysis.
4. One of the young doctors at the clinic discounted claims of an Americas obesity epidemic
and claimed that the BMI scale is outdated and is not a valid predictor of heart health. Using
the metrics created (and perhaps others of your own design) analyze the treadmill data
(Treadmill % of Maximum heart rate), and whether there is a correlation with BMI,
WeightHeight ratio, or other metric or grouping that you can envision.
5. The same doctor that is questioning the BMI scale made the claim that many people now are
large yet still aerobically very healthy (strong cardio-vascular systems) as evidenced by low
treadmill results (much lower peak heart rate than then 85% cut-off). Another doctor claimed
that they may believe this demographic change but not for subjects over 30 or 35 years old.3
design. You could then use these groups in a stacked column chart (added to the legend) or as
the rows or columns in
c) To further analyze subjects add another new column to your array (nume

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!