Group satisfaction rate

Students are partitioned into groups of equal size $m$ similar to Stable roommates problem except $m$ can be any natural number greater than 1. Each student ranks the other students in strict order of preferences.

For each person $i\in \{1,\dots ,n\}$ can rank all other students from the most preferred to the least preferred. These preferences can be thought of as ${p}_{ij}$, where ${p}_{ij}$ is rank (1 highest) of $j$ in $i$'s ordering.

I'm trying to calculate the weighted rate of satisfaction a person would get mathematically from being in a group that contains his preference ranked at n. The weighted rate could be calculated with a function $f(m,{p}_{ij})=?$

The satisfaction rate is a number between 0 and 1 that multiplied by 100 could be converted to percentages.

Each preference should be weighted differently. If the student's group contains one of his preferences ranked at for example ${p}_{ij}=3$ he wouldn't be satisfied as much as a preference ranked at ${p}_{ij}=1$

The ideal group for a person would consist of his preferences ranked at ${p}_{ij}=1$ to ${p}_{ij}=m-1$ (amount of students in a group except for $i$ himself) this would give him a satisfaction rate of 1 (meaning fully satisfied), or written mathematically:

$\sum _{{p}_{ij}=1}^{m-1}f(m,{p}_{ij})=1$

So what could the definition of function $f(m,{p}_{ij})$ be?

Students are partitioned into groups of equal size $m$ similar to Stable roommates problem except $m$ can be any natural number greater than 1. Each student ranks the other students in strict order of preferences.

For each person $i\in \{1,\dots ,n\}$ can rank all other students from the most preferred to the least preferred. These preferences can be thought of as ${p}_{ij}$, where ${p}_{ij}$ is rank (1 highest) of $j$ in $i$'s ordering.

I'm trying to calculate the weighted rate of satisfaction a person would get mathematically from being in a group that contains his preference ranked at n. The weighted rate could be calculated with a function $f(m,{p}_{ij})=?$

The satisfaction rate is a number between 0 and 1 that multiplied by 100 could be converted to percentages.

Each preference should be weighted differently. If the student's group contains one of his preferences ranked at for example ${p}_{ij}=3$ he wouldn't be satisfied as much as a preference ranked at ${p}_{ij}=1$

The ideal group for a person would consist of his preferences ranked at ${p}_{ij}=1$ to ${p}_{ij}=m-1$ (amount of students in a group except for $i$ himself) this would give him a satisfaction rate of 1 (meaning fully satisfied), or written mathematically:

$\sum _{{p}_{ij}=1}^{m-1}f(m,{p}_{ij})=1$

So what could the definition of function $f(m,{p}_{ij})$ be?