Call us

Descriptive Statistics, Data Visualizations and Hypothesis Testing

Statics using R programming

Descriptive Statistics, Data Visualizations and Hypothesis Testing

Answer each question in a word document. Submit both the word document and your RScript file. Both files should have your name and HW2 in the name of the file (i.e. Tom_HW2). Be sure to comment your code.

Efficacy of Pfizer-BioNTech COVID-19 vaccine on adolescents

Description: You have the data set from Pfizer-BioNtech’s Phase 3 trial of their COVID-19 vaccine in adolescents 12 to 15 years old. This was an experiment with controls. PLEASE NOTE: when R reports a very small p-value it will do so using scientific notation, so if you see something like p-value = 3.945e-10 it equals 0.0000000003945.

Efficacy of Pfizer-BioNTech COVID-19 vaccine on adolescents


On March 31, 2021, Pfizer and BioNTech announced that “in a Phase 3 trial in adolescents 12 to 15 years of age with or without prior evidence of SARS-CoV-2 infection, the Pfizer-BioNTech COVID-19 vaccine BNT162b2 demonstrated 100% efficacy and robust antibody responses, exceeding those recorded earlier in vaccinated participants aged 16 to 25 years old, and was well tolerated.” These results are from a Phase 3 trial in 2,260 adolescents 12 to 15 years of age in the United States. In the trial, 18 cases of COVID-19 were observed in the placebo group (n = 1,129) versus none in the vaccinated group (n = 1,131).

Data Format (data file Download data file):

A data frame with 2260 observations on the following 2 variables

1.    group- Study group: vaccine or placebo

2.    outcome- Study outcome: COVID-19 infection or no COVID-19 infection

Source: “Pfizer-Biontech Announce Positive Topline Results Of Pivotal Covid-19 Vaccine Study In Adolescents”Links to an external site.. March 21, 2021. (Retrieved April 25, 2021.)

Getting Started: Code guide.



1.    Identify the control group and the treatment group.

2.    Write a hypothesis for what you think the effect of receiving the Pfizer-BioNTech COVID-19 vaccine was on whether individuals were infected with COVID 19

3.    Now test that hypothesis. Select an alpha, choose the correct binomial hypothesis test and run it.

1.    HINTS:

1.    Separate your data into the treatment and the control groups. (filter function)

2.    Get the sum of the positive COVID tests for each group (use the sum function)

3.    N for each treatment group will be the number of individuals in the groups, not the total number of individuals in the study.

4.    Remember p (the probability of success which in this case is a positive COVID test) IS NOT the same thing as p-value (the likelihood of getting a value as or more extreme as the one in your sample if you were to take another sample using the same methodology).

2.    Provide me with your hypothesis in words and mathematically, and the results of your hypothesis test both mathematically and in words. H0, HA, alpha etc.) Is this a left-tailed, right-tailed or two tailed test? (do you expect the risk of acquiring COVID to be lower in the test group, higher, or just different, and which would result in evidence to approve the vaccine?)

4.    Was receiving the Pfizer-BioNTech vaccine correlated with a statistically significant reduced risk (lower probability) of getting COVID-19?

5.    Does this study make it possible to prove causation (in the sense that any statistically significant difference, if real and not the result of error, is caused by the treatment)? Why or why not?

6.    Vaccines are intended to trigger a strong immune response so that when a person encounters the pathogen they have been immunized against their body will react quickly and fight the infection off before they can become sick. Triggering a strong immune reaction can carry its own risks. Approval of medications/vaccines etc. relies on weighing the risks to the benefits and determining which is greater. The CDC monitors the safety of newly approved drugs and vaccines. Between approval of the Pfizer-BioNTech vaccine for adolescents on May 10, 2021 and July 16, 2021, approximately 8.9 million US adolescents had received the Pfizer-BioNTech vaccine. The CDC tracking system for adverse events received 9,246 (p= 0.00104) reports of adverse events- 90.7% (p=0.00094) were for mild events such as localized muscle soreness, 9.3% (p=0.00009662) were for serious adverse events including allergic reaction and myocarditis (inflammation of the heart) 4.3%. There were 14 reported deaths (p=0.00000045): 2 for pulmonary embolism (blood clot that moves to the lungs), two intracranial hemorrhage (bleeding around the brain), 1 for heart failure, two suicides, one for a disseminated Mycobacterium chelonae infection (sepsis) and the rest are unknown or pending. Some of these deaths would be difficult to ascribe to vaccination. Hospitalization rates for adolescents with COVID in the US who have not been vaccinated is 2.1 per 100,000 (p=0.000021), with 31.4% (p=0.000000659) of those admitted to an ICU. Vaccination confers benefits beyond the individual vaccinated by protecting at-risk individuals around them who might be more severely effected by the infection (herd immunity), but based purely on the above data, which is more risky for adolescents: vaccination Pfizer-BioNTech vaccination, or COVID infection and why?


1.    Food and Drug Administration. Pfizer-BioNTech COVID-19 vaccine emergency use authorization review memorandum. Silver Spring, MD: US Department of Health and Human Services, Food and Drug Administration; 2020. iconLinks to an external site.

2.    Food and Drug Administration. Pfizer-BioNTech COVID-19 vaccine EUA amendment review memorandum. Silver Spring, MD: US Department of Health and Human Services, Food and Drug Administration; 2021. iconLinks to an external site.

3.    Frenck RW Jr, Klein NP, Kitchin N, et al.; C4591001 Clinical Trial Group. Safety, immunogenicity, and efficacy of the BNT162b2 Covid-19 vaccine in adolescents. N Engl J Med 2021;385:239–50. iconLinks to an external site. PMID:34043894external iconLinks to an external site.

4.    Shay DK, Shimabukuro TT, DeStefano F. Myocarditis occurring after immunization with mRNA-based COVID-19 vaccines. JAMA Cardiol 2021. Epub June 29, 2021. iconLinks to an external site.

5.    Israeli Ministry of Health. Surveillance of myocarditis (inflammation of the heart muscle) cases between December 2020 and May 2021 [Press release]. Jerusalem, Israel: Israeli Ministry of Health; 2021. iconLinks to an external site.

6.    Gargano JW, Wallace M, Hadler SC, et al. Use of mRNA COVID-19 vaccine after reports of myocarditis among vaccine recipients: update from the Advisory Committee on Immunization Practices—United States, June 2021. MMWR Morb Mortal Wkly Rep 2021;70:977–82. iconLinks to an external site. PMID:34237049external iconLinks to an external site.

7.    Shimabukuro TT, Nguyen M, Martin D, DeStefano F. Safety monitoring in the Vaccine Adverse Event Reporting System (VAERS). Vaccine 2015;33:4398–405. iconLinks to an external site. PMID:26209838external iconLinks to an external site.

8.    Szarfman A, Machado SG, O’Neill RT. Use of screening algorithms and computer systems to efficiently signal higher-than-expected combinations of drugs and events in the US FDA’s spontaneous reports database. Drug Saf 2002;25:381–92. iconLinks to an external site. PMID:12071774external iconLinks to an external site.

9.    CDC. Syncope after vaccination—United States, January 2005–July 2007. MMWR Morb Mortal Wkly Rep 2008;57:457–60. PMID:18451756external iconLinks to an external site.

10. Marshall M, Ferguson ID, Lewis P, et al. Symptomatic acute myocarditis in seven adolescents following Pfizer-BioNTech COVID-19 vaccination. Pediatrics 2021;e2021052478. iconLinks to an external site. PMID:34088762external iconLinks to an external site.


Both comments and pings are currently closed.

Comments are closed.

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes