0

I'm trying to create a generated dataset through a joint probability table (for example 10% of the total dataset containing $10,000 salary and none for education). But also the distribution needs to include the probability from a second joint probability table

Table 1

Education\Salary $10,000 $20,000
None 0.1 0.2
Hs 0.3 0.1
College 0.2 0.1

Table 2

Age\Salary $10,000 $20,000
30 0.2 0.1
40 0.2 0.1
50 0.2 0.2

I was able to simulate the dataset for table 1, but have no idea how to do it simultaneously with table 2.

  • To generate a sample with three variables (Age, Education, Salary) you need to know the full probabilty, that is, a three-way table unless educatio/age are independent variables. – Ric Jan 05 '23 at 17:03
  • Also, both your salary tables should have the same margin sums. i.e. `colSums(table1) == colSums(table2)`. Given that it is not the case, there is something wrong... – Ric Jan 05 '23 at 17:16
  • All the variables are independent. Full probability is 1 – tech_boy_r_ Jan 05 '23 at 20:04

0 Answers0