Dear R helpers  Suppose I have two sets of ranges (interest rates) as  Range 1 : (7 â 7.50, 7.50 â 8.50, 8.50 â 10.00) with respective probabilities 0.42, 0.22 and 0.36.   Range II : (11-12, 12-14, 14-21) with respective probabilities 0.14, 0.56 and 0.30 respectively.   My problem is to form the combinations of these ranges in a decreasing order of joint probabilities. It is assumed that these ranges are independent.  Suppose A represents (7-7.50), B represents (7.50-8.50) and C represents (8.50 â 10.00). Also let X be (11-12), Y is (12-14) and Z is (14-21).                        These two groups are independent i.e. Prob(A and Y) = P(A) * P(Y)  So there are 9 combinations possible as (AX, AY, AZ, BX, BY, BZ, CX, CY and CZ) respectively with the joint probabilities (0.059, 0.235, 0.126, 0.031, 0.123, 0.066, 0.05, 0.202, 0.108) respectively.  My problem is (i)                              How to obtain these 9 combinations of probabilities in the sense how do I obtain the various combinations of these two ranges along-with their respective probabilities; (ii)                            How to arrange these 9 probabilities in descending order against the respective group combination i.e. for the combination AY, the joint probability is maximum at 0.235, followed by CY at 0.202 and so on.  I sincerely apologize as perhaps I might not have raised the query properly. I have become member of this group today only and its been hardly a week since I have started learning R language. I have easily done this in Excel. My output should be something like this â  Combination  Probability AY                  0.235 CY                  0.202 AZ                 0.126 BY                  0.123 CZ                 0.108 BZ                 0.066 AX                 0.059 CX                 0.050 BX                 0.031   I request you to guide me.  Thanking in advance  Amelia   Â
[[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.