4
$\begingroup$

I would like to express below concisely and mathmatically

  1. TP is a set of real numbers

  2. $$C = \{ x \in TP : x > threshold \}$$

  3. c_count = len(C)

Basically, in English, I want to count the number of numbers in TP is greater than threshold

$\endgroup$
1
  • $\begingroup$ $\#\{x \in TP : x > threshold\}$ or $|\{x \in TP : x > threshold\}|$ $\endgroup$
    – angryavian
    Commented May 22, 2019 at 21:57

2 Answers 2

12
$\begingroup$

Since $C$ is defined as a subset of $TP$ based on the premise of being greater than some threshold, then, if $C$ is finite, you can refer to "cardinality" - it is a measure of how many elements are in a set. It gets murkier for infinite sets, but for finite sets, the cardinality of a set is just the number of elements in the set.

How would one denote cardinality? There are several conventions I've seen:

  • $|C|$ (using absolute value signs)
  • $\#C$ (using a number sign)
  • $\text{card}(C)$ (as a function itself, effectively)
$\endgroup$
5
$\begingroup$

With $C$ defined as above, $|C|$, the cardinality of $C$, would represent the number of elements $x$ in $TP$ such that $x>\text{threshold}$. Written out fully: $$|C|=|\{x\in TP\mid x>\text{threshold}\}|$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .