- Details
- Parent Category: Programming Assignments' Solutions

# We Helped With This R Programming Homework: Have A Similar One?

Category | Programming |
---|---|

Subject | R | R Studio |

Difficulty | Undergraduate |

Status | Solved |

More Info | Statistics And Probability Homework Help |

## Short Assignment Requirements

## Assignment Description

**Objective**

** **

** ****This exercise looks at
categorical (qualitative) data where we have counts or frequencies of
observations associated with levels of one categorical variable in the case of
One-Way tables, and associated with levels of two categorical variables in the
case of Two-Way tables. **

__We use the Chi-squared distribution
to assess the goodness of fit and to test for statistical independence__

Using R software perform an
analysis using a sample of size 100 as specified in the problems below (1,2,3,and
4) __and must do an analysis using the entire dataset __

Refer to the attached data(SMOKING)in Excel on smoking, alcohol consumption, blood pressure, and respiratory disease among1200 adults (SMOKING).

The variables are as follows:

Sex (A): 1 =male , 0 = Female

Smoking status (B) : 0 = Nonsmoker, 1= Smoker

Drinking level (C): 0= nondrinker, 1= Light to moderate drinker, 2= heavy drinker

Symptoms of respiratory disease (D) : 1 = present; 0 = absent

High blood pressure status (E) : 1 = present; 0 = absent

**Problems**

** **

**1**)Select a simple
random sample of size 100 from this population and carry out an analysis to see
if you can conclude that there is a relationship between smoking status and
symptoms of respiratory disease. **Let α = 0.05 **and determine the p value
for your test.

**2)** Select a simple
random sample of size 100 from the population and carry out a

test to see if you can conclude that there is a relationship between drinking status and high blood

pressure
status in the population. **Let α = 0.05 **and determine the p value.

**3)** Select a simple
random sample of size 100 from the population and carry out a test to see if
you can conclude that there is a relationship between gender and smoking status
in the population. **Let α = 0.05 **and determine the p value.

**4)** Select a simple
random sample of size 100 from the population and carry out a test to see if
you can conclude that there is a relationship between gender and drinking level
in the population. **Let α = 0.05 **and find the p value.