Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions _subfiles/indicator-functions/_def-indicator-function.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:::{#def-indicator-function}

Check warning on line 1 in _subfiles/indicator-functions/_def-indicator-function.qmd

View workflow job for this annotation

GitHub Actions / check-informal-definitions / check-informal-definitions

Definition problem

[no-link-in-definition] Definition div links no other term: hyperlink each technical term on first use in the div, and give any term with no definition its own def div.
#### Indicator function, set indicator

For any subset $A \subseteq \universe$ of a universal set $\universe$,
the **indicator function** of $A$,
[@wikipedia_indicator_function]
or **set indicator**,
is the function
$\indic{A} : \universe \to \{0, 1\}$ defined by:

$$
\indic{A}(x) \eqdef \begin{cases}
1, & x \in A \\
0, & x \notin A
\end{cases}
$$

:::
15 changes: 15 additions & 0 deletions _subfiles/indicator-functions/_def-iverson-bracket.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:::{#def-iverson-bracket}

Check warning on line 1 in _subfiles/indicator-functions/_def-iverson-bracket.qmd

View workflow job for this annotation

GitHub Actions / check-informal-definitions / check-informal-definitions

Definition problem

[no-link-in-definition] Definition div links no other term: hyperlink each technical term on first use in the div, and give any term with no definition its own def div.
#### Iverson bracket

For any logical proposition $P$,
the **Iverson bracket** of $P$ is
[@wikipedia_iverson_bracket]

$$
[P] \eqdef \begin{cases}
1, & \text{if } P \text{ is true} \\
0, & \text{if } P \text{ is false}
\end{cases}
$$

:::
15 changes: 15 additions & 0 deletions _subfiles/indicator-functions/_def-kronecker-delta.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:::{#def-kronecker-delta}
#### Kronecker delta

For integers $i$ and $j$,
the **Kronecker delta** is
[@wikipedia_kronecker_delta]

$$\kron_{ij} \eqdef [i = j]$$

that is,
$\kron_{ij} = 1$ when $i = j$
and $\kron_{ij} = 0$ when $i \neq j$
(@def-iverson-bracket).

:::
17 changes: 17 additions & 0 deletions _subfiles/indicator-functions/_def-predicate-indicator.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:::{#def-predicate-indicator}

Check warning on line 1 in _subfiles/indicator-functions/_def-predicate-indicator.qmd

View workflow job for this annotation

GitHub Actions / check-informal-definitions / check-informal-definitions

Definition problem

[no-link-in-definition] Definition div links no other term: hyperlink each technical term on first use in the div, and give any term with no definition its own def div.
#### Predicate indicator

For any logical proposition or predicate $P$,
the **indicator** of $P$,
or **predicate indicator**,
takes the value $1$ when $P$ is true
and $0$ when $P$ is false:

$$
\indicp{P} \eqdef \begin{cases}
1, & \text{if } P \text{ is true} \\
0, & \text{if } P \text{ is false}
\end{cases}
$$

:::
22 changes: 22 additions & 0 deletions _subfiles/indicator-functions/_exm-indicator-numerical.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:::{#exm-indicator-numerical}
#### Evaluating set and predicate indicators

Consider the real line $\universe = \reals$,
the set of nonnegative numbers $A = [0, \infty)$,
and a continuous
[random variable](https://morrison-lab.github.io/pds/random-variables.html#def-random-variable)
$Y$ (defined in the Morrison Lab's probability notes).

1. Set indicator $\indic{A}(x)$:
- For $x = 3.5$: since $3.5 \in [0, \infty)$, $\indic{A}(3.5) = 1$.
- For $x = -2.1$: since $-2.1 \notin [0, \infty)$, $\indic{A}(-2.1) = 0$.

2. Predicate indicator $\indicp{Y > 5}$:
- If an observation yields $Y = 7.2$,
the predicate $7.2 > 5$ is true,
so $\indicp{7.2 > 5} = 1$.
- If an observation yields $Y = 4.1$,
the predicate $4.1 > 5$ is false,
so $\indicp{4.1 > 5} = 0$.

:::
8 changes: 8 additions & 0 deletions _subfiles/indicator-functions/_exm-iverson-bracket.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:::{#exm-iverson-bracket}
#### Evaluating Iverson brackets

- $[3 > 2] = 1$, because $3 > 2$ is true.
- $[2 > 3] = 0$, because $2 > 3$ is false.
- $[4 \in \cb{1, 2}] = 0$, because $4$ is not an element of $\cb{1, 2}$.

:::
32 changes: 32 additions & 0 deletions _subfiles/indicator-functions/_exm-kronecker-delta.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:::{#exm-kronecker-delta}
#### Evaluating the Kronecker delta

- $$
\begin{aligned}
\kron_{11} &= [1 = 1] \\
&= 1.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{12} &= [1 = 2] \\
&= 0.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{22} &= [2 = 2] \\
&= 1.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{23} &= [2 = 3] \\
&= 0.
\end{aligned}
$$

:::
134 changes: 7 additions & 127 deletions _subfiles/indicator-functions/_sec-indicator-functions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,69 +23,15 @@ This section summarizes the principal notational conventions.

{{< slidebreak >}}

:::{#def-indicator-function}
#### Indicator function, set indicator

For any subset $A \subseteq \universe$ of a universal set $\universe$,
the **indicator function** of $A$,
[@wikipedia_indicator_function]
or **set indicator**,
is the function
$\indic{A} : \universe \to \{0, 1\}$ defined by:

$$
\indic{A}(x) \eqdef \begin{cases}
1, & x \in A \\
0, & x \notin A
\end{cases}
$$

:::
{{< include mds/_subfiles/indicator-functions/_def-indicator-function.qmd >}}

{{< slidebreak >}}

:::{#def-predicate-indicator}
#### Predicate indicator

For any logical proposition or predicate $P$,
the **indicator** of $P$,
or **predicate indicator**,
takes the value $1$ when $P$ is true
and $0$ when $P$ is false:

$$
\indicp{P} \eqdef \begin{cases}
1, & \text{if } P \text{ is true} \\
0, & \text{if } P \text{ is false}
\end{cases}
$$

:::
{{< include mds/_subfiles/indicator-functions/_def-predicate-indicator.qmd >}}

{{< slidebreak >}}

:::{#exm-indicator-numerical}
#### Evaluating set and predicate indicators

Consider the real line $\universe = \reals$,
the set of nonnegative numbers $A = [0, \infty)$,
and a continuous
[random variable](https://morrison-lab.github.io/pds/random-variables.html#def-random-variable)
$Y$ (defined in the Morrison Lab's probability notes).

1. Set indicator $\indic{A}(x)$:
- For $x = 3.5$: since $3.5 \in [0, \infty)$, $\indic{A}(3.5) = 1$.
- For $x = -2.1$: since $-2.1 \notin [0, \infty)$, $\indic{A}(-2.1) = 0$.

2. Predicate indicator $\indicp{Y > 5}$:
- If an observation yields $Y = 7.2$,
the predicate $7.2 > 5$ is true,
so $\indicp{7.2 > 5} = 1$.
- If an observation yields $Y = 4.1$,
the predicate $4.1 > 5$ is false,
so $\indicp{4.1 > 5} = 0$.

:::
{{< include mds/_subfiles/indicator-functions/_exm-indicator-numerical.qmd >}}

{{< slidebreak >}}

Expand Down Expand Up @@ -173,32 +119,11 @@ the Iverson bracket

{{< slidebreak >}}

:::{#def-iverson-bracket}
#### Iverson bracket

For any logical proposition $P$,
the **Iverson bracket** of $P$ is
[@wikipedia_iverson_bracket]

$$
[P] \eqdef \begin{cases}
1, & \text{if } P \text{ is true} \\
0, & \text{if } P \text{ is false}
\end{cases}
$$

:::
{{< include mds/_subfiles/indicator-functions/_def-iverson-bracket.qmd >}}

{{< slidebreak >}}

:::{#exm-iverson-bracket}
#### Evaluating Iverson brackets

- $[3 > 2] = 1$, because $3 > 2$ is true.
- $[2 > 3] = 0$, because $2 > 3$ is false.
- $[4 \in \cb{1, 2}] = 0$, because $4$ is not an element of $\cb{1, 2}$.

:::
{{< include mds/_subfiles/indicator-functions/_exm-iverson-bracket.qmd >}}

{{< slidebreak >}}

Expand Down Expand Up @@ -232,56 +157,11 @@ $$

{{< slidebreak >}}

:::{#def-kronecker-delta}
#### Kronecker delta

For integers $i$ and $j$,
the **Kronecker delta** is
[@wikipedia_kronecker_delta]

$$\kron_{ij} \eqdef [i = j]$$

that is,
$\kron_{ij} = 1$ when $i = j$
and $\kron_{ij} = 0$ when $i \neq j$
(@def-iverson-bracket).

:::
{{< include mds/_subfiles/indicator-functions/_def-kronecker-delta.qmd >}}

{{< slidebreak >}}

:::{#exm-kronecker-delta}
#### Evaluating the Kronecker delta

- $$
\begin{aligned}
\kron_{11} &= [1 = 1] \\
&= 1.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{12} &= [1 = 2] \\
&= 0.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{22} &= [2 = 2] \\
&= 1.
\end{aligned}
$$

- $$
\begin{aligned}
\kron_{23} &= [2 = 3] \\
&= 0.
\end{aligned}
$$

:::
{{< include mds/_subfiles/indicator-functions/_exm-kronecker-delta.qmd >}}

### Strengths and limitations of the Iverson bracket

Expand Down
Loading