# Test of two proportions

#### epinerd

##### New Member
50% (50 out of 100 people) in Country X experience a heart attack over a 5 year period. 30 out of the 50 people experience a repeated heart attack in Country X. In State A of Country X, 20% (10 out of 50 people) experience a heart attack over the same 5 year period. 10 out of the 10 people experience a repeated heart attack in State A. All data is from the same database/source and period of data collection (5 years). I want to know if the proportions of repeated heart attacks between Country X and State A is significantly different over this 5 year period. Can I use the test of two proportions z-test when the sample of data is from the same database and over this period of time?

#### Karabiner

##### TS Contributor
So you have 10 with & 40 without heart attack in state A,
and 40 with &10 without heart attack in the remaining states.
You could just compare state A versus rest (4fould table with
Chi² test).

With kind regards

Karabiner

#### epinerd

##### New Member
Thank you. The total Country X data includes the State A data. Does this mean I remove State A data from Country X data in order to compare?

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Yes, that is what he was referring to.

So, no one died or there is no loss to follow-up?

#### epinerd

##### New Member
I made up data to test a real-world example.
Man, I have never removed embedded data to test a relationship.
What is the statistical logic behind removing embedded data?