There are two candidates A & B running for an office. Suppose that 60% of the voters in the country support candidate A. We pick an individual randomly. Define random variable X = 1, if the individual support candidate A, and X = 0 if the individual supports candidate B. a) What is the expected value of X. b) Use the sample function to draw three random samples of sizes, 10, 1000 and 1000,000 from this binary variable. Calculate the sample mean in each case and show that as n

Holt Mcdougal Larson Pre-algebra: Student Edition 2012
1st Edition
ISBN:9780547587776
Author:HOLT MCDOUGAL
Publisher:HOLT MCDOUGAL
Chapter11: Data Analysis And Probability
Section: Chapter Questions
Problem 8CR
icon
Related questions
Question
Please do a) and b) with R studio or show calculation steps, thank you. Do not randomly write wrong answers if don't k ow how to solve.
Q1) EXAMPLE WITH A BINARY RANDOM VARIABLE: turn in the printout
There are two candidates A & B running for an office. Suppose that 60% of the voters in the
country support candidate A. We pick an individual randomly. Define random variable X = 1, if
the individual support candidate A, and X = 0 if the individual supports candidate B.
a) What is the expected value of X.
b)
Use the sample function to draw three random samples of sizes, 10, 1000 and 1000,000
from this binary variable. Calculate the sample mean in each case and show that as n
increases the sample mean approaches the true population mean.
Reminder: The "SAMPLE" function in R:
SAMPLE (c(.) # possible values of RV; size = # sample size; replace = TRUE # with replacement;
prob = c(.) # probabilities).
Transcribed Image Text:Q1) EXAMPLE WITH A BINARY RANDOM VARIABLE: turn in the printout There are two candidates A & B running for an office. Suppose that 60% of the voters in the country support candidate A. We pick an individual randomly. Define random variable X = 1, if the individual support candidate A, and X = 0 if the individual supports candidate B. a) What is the expected value of X. b) Use the sample function to draw three random samples of sizes, 10, 1000 and 1000,000 from this binary variable. Calculate the sample mean in each case and show that as n increases the sample mean approaches the true population mean. Reminder: The "SAMPLE" function in R: SAMPLE (c(.) # possible values of RV; size = # sample size; replace = TRUE # with replacement; prob = c(.) # probabilities).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Recommended textbooks for you
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
Calculus For The Life Sciences
Calculus For The Life Sciences
Calculus
ISBN:
9780321964038
Author:
GREENWELL, Raymond N., RITCHEY, Nathan P., Lial, Margaret L.
Publisher:
Pearson Addison Wesley,
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning