+10 XP
Why Neuroscientists Love Statistics
Neuroscience is noisy. A single spike time tells you almost nothing β it could be random noise. But look at 1000 spikes from the same neuron under the same stimulus? That's signal.
The ensemble principle: Average across many trials, many neurons, or many conditions. The noise cancels out. The real signal emerges.
This is why NMA spends entire weeks on statistics. Understanding distributions, variance, and confidence intervals is how you separate the brain's true logic from measurement noise.
python
import numpy as np
import matplotlib.pyplot as plt
# Simulate 1000 presentations of the same stimulus
# Each time, neuron fires some number of spikes (noisy)
spike_counts = np.random.poisson(lam=15, size=1000) # mean 15 spikes per trial
print(f'Mean spikes per trial: {spike_counts.mean():.1f}')
print(f'Std dev: {spike_counts.std():.1f}')
print(f'Min: {spike_counts.min()}, Max: {spike_counts.max()}')
# Plot distribution
plt.hist(spike_counts, bins=20, edgecolor='black')
plt.xlabel('Spikes per trial')
plt.ylabel('Count')
plt.title('Distribution of spike counts across 1000 trials')
plt.show()
# The mean and std tell you everything
print(f'Neuron fires {spike_counts.mean():.1f} Β± {spike_counts.std():.1f} spikes')Mean and std dev are two numbers that characterize an entire distribution of noisy measurements.