<jupyter_start><jupyter_text>Essential Statistics and Probability--- *R language is used*  Data Representation Data can be represented numerically or graphically in various ways.Consider following dataset vector consisting of 20 random integers:<jupyter_code>arr <- sort(sample(78:99, 20, replace = T))
print(arr)
print(length(arr))<jupyter_output>[1] 80 80 81 82 83 83 85 85 86 87 87 88 89 92 92 92 93 95 96 98
[1] 20<jupyter_text>The stem-and-leaf plot can be generated as follows:<jupyter_code>stem(arr)<jupyter_output>The decimal point is 1 digit(s) to the right of the |

  8 | 001233
  8 | 5567789
  9 | 2223
  9 | 568<jupyter_text>This is one of the simplest but most useful representations of data. The numbers range from 78 to 99. We divide these numbers into 5 groups, 75–79, 80–84, 85–89, 90–94, 95–99. The integers in the tens position of the groups are 7, 8, 8, 9, 9. These form the *stem*.The number of times a value occurs is called its **absolute frequency**.The **cumulative absolute frequencies** is the sum of the absolute frequencies of the values up to the line of the leaf.Dividing the cumulative absolute frequencies by *n* (= 20) gives the **cumulative relative frequencies**. For large sets of data, histograms are better in displaying the distribution of data than stem-and-leaf plots.The bases of rectangles are **x-intervals** (also known as **class-intervals**).The midpoints of the class-intervals are known as **class marks**.The height of a rectangle with class mark $x$ is the relative class frequency $f_{rel}\left(x\right)$, defined as the number of data values in that class interval, divided by $n$. The histogram can be generated by *hist* function:<jupyter_code>hist(arr)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.06264367816091954, 'mean_word_length': 5.045138888888889, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '167695', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 604, 'n_tokens_neox': 488, 'n_words': 244, 'path': 'src/stats_and_prob.ipynb', 'repo_name': 'Kaushal1011/machine-learning', 'size': '1740'}