Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Simulate data for both groups
- group_1 <- rgeom(10000, 1/(1 + 3.7))
- group_1_alternate <- rgeom(10000, 1/(1 + 3.7))
- group_2 <- rgeom(10000, 1/(1 + 4.35))
- # Compare Group 1 to itself to get a baseline chance that a random person
- # drawn from this distribution outperforms itself
- group_1_greater_self <- sum(group_1 > group_1_alternate)
- # Compare Group 2 to Group 1 to get the new percentage chance that a random
- # person drawn from Group 2 outperforms a random person from Group 1
- group_2_greater_group_1 <- sum(group_2 > group_1)
- # Calculate the risk ratio
- training_rr <- group_2_greater_group_1/group_1_greater_self
- # The risk ratio falls around 1.09. Can I interpret this that there's a 9%
- # chance someone going through training will see greater sales than if they
- # didn't attend training?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement