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$ $ $ $ $ $ $ $ $ $ $ $2$
$5$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $0$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $1$
My lecturer said that this is true:
$P$ $(2\le$$X\le3)$ = ${8\over 20}$
$P$ $(1\le$$X\le6)$ =  $1$ - ${1\over 20}$ = ${19\over 20}$
So, my question is:
Why is he not adding the last number into the range?
To me, since it is $"less $ $ than $ $  or $ $ equal $ $ to"$ this has to be:
$P$ $(2\le$$X\le3)$ = ${12\over 20}$
$P$ $(1\le$$X\le6)$ =  $1$ - ${0\over 20}$ = ${20\over 20}$
Does it have something to do with continuous or discrete data? Cause in another example he added the last number into the range.
 A: It's important to note that (for example) $2\le X\le 3$ translates to "$2$ is less than or equal to $X,$ and $X$ is less than or equal to $3.$" Thus, $2\le X\le 3$ will be true if and only if both $2\le X$ and $X\le 3$ are true. Put another way, $2\le X\le 3$ will be true if and only if neither $X<2$ nor $3<X$ is true.
Thus, the reason that $P(2\le X\le 3)\ne\frac{12}{20}$ is because each of the following four statements is false: $$2\le 3.3\le 3\\2\le 3.4\le 3\\2\le 3.5\le 3\\2\le 3.9\le 3.$$ After all, $3$ is strictly less than each of $3.3,3.4,3.5,3.9.$
The reason that $P(1\le X\le 6)\ne\frac{20}{20}$ is because the following statement is false: $$1\le 0.8\le 6.$$ After all, $0.8$ is strictly less than $1.$
As a side note, you omitted $2.8$ from your stem-and-leaf plot.
A: Entering data into R statistical software:
x = c(2.6, 3.3, 2.4, 1.1, 0.8, 3.5, 3.9, 1.6, 2.8, 2.6,  3.4, 4.1, 2.0, 1.7, 2.9, 1.9, 2.9, 2.5, 4.5, 5.0)

Sorting the $n = 20$ observations from smallest to largest:
sort(x)
 [1] 0.8 1.1 1.6 1.7 1.9 2.0 2.4 2.5 2.6 2.6
[11] 2.8 2.9 2.9 3.3 3.4 3.5 3.9 4.1 4.5 5.0

It is clear that all 20 observations lie between 0 and 5 inclusive, but only 19 observations lie between 1 and 5 inclusive. The smallest observation $0.8$ does not lie
in the latter interval.
The stem plot in R gives the same results as in your
Question:
stem(x)

The decimal point is at the |

 0 | 8
 1 | 1679
 2 | 04566899
 3 | 3459
 4 | 15
 5 | 0

Endpoints for disjoint intervals of length 1 for these data are as follows. In an histogram these values are
sometimes called 'cutpoints'. By choosing cutpoints that
do not occur among the observations being plotted, we
can be sure that intervals are disjoint.
cutp = -.05:5.96
cutp
[1] -0.05  0.95  1.95  2.95  3.95  4.95  5.95

The histogram below uses these cutpoints to make the 'bins' of the histogram. The frequency of each of the resulting histogram bars is shown by a number atop the bar.
hist(x, br=cutp, label=T, ylim=c(0,9), col="skyblue2")


A graph that effectively shows the exact locations of the observations in a small sample is the 'stripchart' (some statistical programs make 'dotplots', which are similar).
stripchart(x, meth="stack", offset=1, pch=20)


A: I created a different diagram than yours. Please see below. It is clear that the probability is as your instructor suggested by the probability definition, namely: 
P(X)=Number of occurrences of Elements in Interval / Total Number of Elements.
If this is not clear let me know.

A: The stem-and-leaf plot is equivalent to the following frequency and relative frequency table:
$$\begin{array}{c|l|c|c|с}
Stem&Leaf&f&&X&f&P(X)\\
\hline
0&8&1&&[0,1) \text{ or $0\le X<1$}&\color{red}1&\color{red}1/\color{blue}{20} \\
1&1679&4&&[1,2) \text{ or $1\le X<2$}&\color{red}4&\color{red}4/\color{blue}{20}\\
2&04566899&8&&[2,3) \text{ or $2\le X<3$}&\color{red}8&\color{red}8/\color{blue}{20}\\
3&3459&4&&[3,4) \text{ or $3\le X<4$}&\color{red}4&\color{red}4/\color{blue}{20}\\
4&15&2&&[4,5) \text{ or $4\le X<5$}&\color{red}2&\color{red}2/\color{blue}{20}\\
5&0&1&&[5,6) \text{ or $5\le X<6$}&\color{red}1&\color{red}1/\color{blue}{20}\\
\hline
&&20&& &\color{blue}{20}\\
  \end{array}$$ 
Note that:
$$P(2\le X\le 3)=P(2\le X<3)+P(X=3)=\frac8{20}+\frac0{20}=\frac8{20}.$$
Similarly:
$$\begin{align}P(1\le X\le 2)&=P(1\le X<2)+P(X=2)=\frac4{20}+\frac1{20}=\frac5{20},\\
P(1\le X\le 6)&=\color{blue}{P(0\le X\le 6)}-P(0\le X<1)=\\
&=\color{blue}{P(0\le X<6)+P(X=6)}-P(0\le X<1)=\\
&=\frac{20}{20}+\frac0{20}-\frac1{20}=\frac{19}{20}.\end{align}$$
Exercise: 1) $P(3\le X\le 5)$; 2) $P(2.5\le X<3.5)$.
Answers (see the hidden area): 

 1) $\frac7{20}$. 2) $\frac8{20}$.

