Create a table named summed_mn_data, with three columns and two rows. The three columns should be "Condition", "Died sum", and "Participated sum". There should be one row for the diet group and one row for the control group, and each row should encode the total number of people who participated in that group and the total number of people who died in that group. summed_mn_data = ... summed_mn_data

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Question 4.2: Create a table named summed_mn_data, with three columns and two rows. The three columns should be "Condition", "Died sum", and "Participated sum". There should be one row for the diet group and one row for the control group, and each row should encode the total number of people who participated in that group and the total number of people who died in that group.

summed_mn_data = ...
summed_mn_data
The Data
We want to see whether or not death rates were reduced on low saturated fat diet. Unfortunately, the data for each individual in the 1968 study is not available;
only summary statistics are available.
The following table is a summarized version of the data collected in the experiment.
In [5]:
N mortality_summary = Table.read_table('mortality_summary.csv')
mortality_summary
Out[5]:
Age Condition
Total Deaths CHD Deaths
0-34
Diet
1367
35-44
Diet
728
3
45-54
Diet
767
14
4
55-64
Diet
870
35
7
65+
Diet
953
190
42
0-34
Control
1337
7
1
35-44
Control
731
4
1
45-54
Control
816
16
4
55-64
Control
896
33
12
65+
Control
958
162
34
Transcribed Image Text:The Data We want to see whether or not death rates were reduced on low saturated fat diet. Unfortunately, the data for each individual in the 1968 study is not available; only summary statistics are available. The following table is a summarized version of the data collected in the experiment. In [5]: N mortality_summary = Table.read_table('mortality_summary.csv') mortality_summary Out[5]: Age Condition Total Deaths CHD Deaths 0-34 Diet 1367 35-44 Diet 728 3 45-54 Diet 767 14 4 55-64 Diet 870 35 7 65+ Diet 953 190 42 0-34 Control 1337 7 1 35-44 Control 731 4 1 45-54 Control 816 16 4 55-64 Control 896 33 12 65+ Control 958 162 34
In order to test whether eating diet actually reduced death rates, we need to synthetically create a table with one row for each participant in the study.
We want to expand the mortality_summary table to create a row for each study participant. minnesota_data is a table with four columns: "Age",
"Condition", "Participated" and "Died". Each row contains a specific patient and has their age group and condition as specified in the mortality_summary
table, a True in the "Participated" column (since everyone participated in the experiment), and either a True or False in the "Died" column, depending on
if they are alive or dead.
Run the cell below to view the study data that has been created from the summary statistics.
In [6]:
I minnesota_data = Table(['Age',
"Condition',
'Died',
'Participated '])
for row in mortality_summary.rows:
count = np.arange(0, row.item('Total'))
t = Table().with_column('Died', count < row.item('Deaths'))
t = t.with_column('Age', row.Age)
t = t.with_column('Condition', row.Condition)
t = t.with_column('Participated', True)
minnesota_data.append (t)
minnesota_data
Out[6]:
Age Condition
Died Participated
0-34
Diet
True
True
0-34
Diet
True
True
0-34
Diet
True
True
0-34
Diet False
True
0-34
Diet False
True
0-34
Diet False
True
0-34
Diet False
True
0-34
Diet False
True
0-34
Diet False
True
0-34
Diet False
True
(9413 rows omitted)
We'll need to look at the breakdown for death rates for both the treatment (diet) and control groups.
Transcribed Image Text:In order to test whether eating diet actually reduced death rates, we need to synthetically create a table with one row for each participant in the study. We want to expand the mortality_summary table to create a row for each study participant. minnesota_data is a table with four columns: "Age", "Condition", "Participated" and "Died". Each row contains a specific patient and has their age group and condition as specified in the mortality_summary table, a True in the "Participated" column (since everyone participated in the experiment), and either a True or False in the "Died" column, depending on if they are alive or dead. Run the cell below to view the study data that has been created from the summary statistics. In [6]: I minnesota_data = Table(['Age', "Condition', 'Died', 'Participated ']) for row in mortality_summary.rows: count = np.arange(0, row.item('Total')) t = Table().with_column('Died', count < row.item('Deaths')) t = t.with_column('Age', row.Age) t = t.with_column('Condition', row.Condition) t = t.with_column('Participated', True) minnesota_data.append (t) minnesota_data Out[6]: Age Condition Died Participated 0-34 Diet True True 0-34 Diet True True 0-34 Diet True True 0-34 Diet False True 0-34 Diet False True 0-34 Diet False True 0-34 Diet False True 0-34 Diet False True 0-34 Diet False True 0-34 Diet False True (9413 rows omitted) We'll need to look at the breakdown for death rates for both the treatment (diet) and control groups.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education