Probability of Same Relative Order of n Elements

In summary, the probability that two arrays or sequences of size n are in the same relative order is 1/n!. This problem can be simplified if the elements are assumed to be distinct.
  • #1
dabd
25
0
Hi,

Given two arrays (or sequences) of size n. What is the probability that they are in the same relative order?

Ex: s = [5, 10, 18, 3, 7] and t = [6, 9, 20, 1, 7] are in the same relative order.

Note: The elements of the sequence are drawn from a set with a total order defined, say the natural numbers.

Thanks.
 
Last edited:
Physics news on Phys.org
  • #2
Hi dabd! :smile:

Hint: the first sequence can be anything, in any order.

So how many possiblities are there for the second sequence? :wink:
 
  • #3
tiny-tim said:
Hi dabd! :smile:

Hint: the first sequence can be anything, in any order.

So how many possiblities are there for the second sequence? :wink:

Of course there infinitely many possibilities for the second sequence.

Putting it in other way, two sequences of length n are in the same relative order if we sort them and their elements positions (in the original sequences) are the same.

s = [5, 10, 18, 3, 7] positions = [1, 2, 3, 4, 5]

and t = [6, 9, 20, 1, 7] positions = [1, 2, 3, 4, 5]


s'= [3, 5, 7, 10, 18] positions = [4, 1, 5, 2, 3]
and t' = [1, 6, 7, 9, 20] positions = [4, 1, 5, 2, 3]

Given the first sequence just sort it and note the positions (4, 1, 5, 2, 3) in the example.
For the second sequence any sorted sequence will do, and of course there are infinitely many different sorted sequences, and to get the same relative order sequence just "unshuffle" its positions.

But, I don't get how can I compute the probability!
 
  • #4
The problem simplifies dramatically if the elements are assumed to be distinct.
 
  • #5
I think that for an array of n numbers, there are n! possible permutations... so I guess that for your example the prob would be 1/(5!).
 

1. What is the "Probability of Same Relative Order of n Elements"?

The "Probability of Same Relative Order of n Elements" is a mathematical concept that measures the likelihood of a set of n elements to appear in the same relative order when randomly arranged. It is commonly used in statistics and data analysis to understand the consistency of data points.

2. How is the "Probability of Same Relative Order of n Elements" calculated?

The "Probability of Same Relative Order of n Elements" can be calculated using the formula P = 1/n!, where n is the number of elements in the set. This formula assumes that all possible arrangements of the elements are equally likely.

3. Can the "Probability of Same Relative Order of n Elements" be greater than 1?

No, the "Probability of Same Relative Order of n Elements" cannot be greater than 1. This is because the probability of an event can never be greater than 1, as it represents the certainty of that event occurring.

4. How does the number of elements affect the "Probability of Same Relative Order of n Elements"?

The "Probability of Same Relative Order of n Elements" decreases as the number of elements increases. This is because the number of possible arrangements also increases, making it less likely for the elements to appear in the same relative order.

5. What are the real-world applications of the "Probability of Same Relative Order of n Elements"?

The "Probability of Same Relative Order of n Elements" is commonly used in fields such as genetics, finance, and data analysis. It can help predict the likelihood of certain patterns or outcomes, and guide decision-making processes in various industries.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
2
Replies
35
Views
526
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
28
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
469
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
20
Views
1K
Back
Top