Hello, I have the following problem:
I need to count values that are common between multiple columns or arrays, which are not equal in size.
Example:
1 1 1
3 8 8
7 7
5 4
9
Result sought:
Number of values common to 3 columns = 1 (value 1)
Number of values common to at least 2 columns = 3 (values 1, 7, 8)
Number of values common to at least 1 column = 7 (total number of values in all columns with duplicates, triplicates etc. counted only once)
I don't need to know which particular values are common between columns, just their numbers.
The ultimate goal is to extrapolate this to many columns (at least 20), with each column drawing randomly an array of (non-repeating) numbers from a larger pool. Then, iterate this random procedure many times in a Monte Carlo simulation to obtain, for each result sought above, a mean number + variance.
Any help is appreciated. Thank you.
Bookmarks