<jupyter_start><jupyter_text>Random Signals*This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing.  IntroductionRandom signals are signals whose values are not (or only to a limited extend) predictable. Frequently used alternative terms are* stochastic signals* non-deterministic signalsRandom signals play an important role in various fields of signal processing and communications. This is due to the fact that only random signals carry information. A signal which is observed by a receiver has to be unknown to some degree in order to represent novel [information](https://en.wikipedia.org/wiki/Information).Random signals are often classified as useful/desired and disturbing/interfering signals. For instance* useful signals: data, speech, music, images, ...* disturbing signals: thermal noise at a resistor, amplifier noise, quantization noise, ...Practical signals are frequently modeled as a combination of useful signals and additive noise.As the values of a random signal cannot be foreseen, the properties of random signals are described by the their statistical characteristics. One measure is for instance the average value of a random signal. **Example - Random Signals**The following audio examples illustrate the characteristics of some deterministic and random signals. Lower the volume of your headphones or loudspeakers before playing back the examples.1. Cosine signal    Your browser does not support the audio element.[./cosine.wav](./cosine.wav)2. Noise    Your browser does not support the audio element.[./noise.wav](./noise.wav)3. Cosine signal superpositioned by noise    Your browser does not support the audio element.[./cosine_noise.wav](./cosine_noise.wav)4. Speech signal    Your browser does not support the audio element.[../data/speech.wav](../data/speech.wav)5. Speech signal superpositioned by noise    Your browser does not support the audio element.[./speech_noise.wav](./speech_noise.wav) **Excercise*** Which example can be considered as deterministic, random signal or combination of both?Solution: The cosine signal is the only deterministic signal. Noise and speech are random signals, as their samples can not (or only to a limited extend) be predicted from previous samples. The superposition of the cosine and noise signals is a combination of a deterministic and a random signal.  Processing of Random SignalsIn contrary to the assumption of deterministic signals in traditional signal processing, [statistical signal processing](https://en.wikipedia.org/wiki/Statistical_signal_processing) treats signals explicitly as random signals. Two prominent application examples involving random signals are  Measurement of physical quantitiesThe measurement of physical quantities is often subject to additive noise and distortions. The additive noise models e.g. the sensor noise. The distortions, by e.g. the transmission properties of an amplifier, may be modeled by a system.![Model for the measurement of physical quantities](measurement_channel.png)$\mathcal{H}$ denotes an arbitrary (not necessarily LTI) system. The aim of statistical signal processing is to estimate the physical quantity from the observed sensor data, given some knowledge on the disturbing system and the statistical properties of the noise.  Communication channelIn communications engineering a message is sent over a channel distorting the signal by e.g. multipath propagation. Additive noise is present at the receiver due to background and amplifier noise.![Model for the transmission of a message over a communication channel](communication_channel.png)The aim of statistical signal processing is to estimate the send message from the received message, given some knowledge on the disturbing system and the statistical properties of the noise.  Random ProcessesA random process is a [stochastic process](https://en.wikipedia.org/wiki/Stochastic_process) which generates an ensemble of random signals. A random process* provides a mathematical model for an ensemble of random signals and* generates different sample functions with specific common properties.It is important to differentiate between an* *ensemble*: collection of all possible signals of a random process and an* *sample function*: one specific random signal.An example for a random process is speech produced by humans. Here the ensemble is composed from the speech signals produced by all humans on earth, one particular speech signal produced by one person at a specific time is a sample function. **Example - Sample functions of a random process**The following example shows sample functions of a continuous amplitude real-valued random process. All sample functions have the same properties with respect to certain statistical measures.<jupyter_code>%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

N = 5  # number of sample functions


# draw N sample functions from a random process
np.random.seed(0)
x = np.random.normal(size=(N, 32))

# plot sample functions
fig = plt.figure(figsize=(10, 12))
for n in range(N):
    plt.subplot(N, 1, n+1)
    plt.tight_layout()
    plt.stem(x[n,:], basefmt='k-')
    plt.title('Sample Function %d' %n)
    plt.xlabel(r'$k$')
    plt.ylabel(r'$x_%d[k]$' %n)
    plt.axis([-1, 32, -3, 3])
    plt.grid()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06031746031746032, 'fraction_numerical': 0.003734827264239029, 'mean_word_length': 5.06568516421291, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '61834', 'license': 'MIT', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1200, 'n_words': 684, 'path': 'Lectures_Advanced-DSP/random_signals/introduction.ipynb', 'repo_name': 'lev1khachatryan/ASDS_DSP', 'size': '5355'}