Hypothesis testing using spectra How does hypothesis testing work when a measurement is not a single number, but an entire spectrum?
For instance, suppose we want to distinguish a species of plant based on its absorption spectrum. By taking lots of measurements we obtain an estimate of the standard deviation of the population for species 1 and species 2 (represented here by the two different colours):

Note: in this particular case, there is an area with no overlap between the standard deviation bands (i.e. the shaded areas). Often this might not be the case. But there are always areas where there is not a complete overlap.
So, when a new measurement is taken, how do we decide whether the measured plant belongs to species 1 or species 2?
In statistics how do we generally deal with spectra as opposed to numbers?
 A: It seems like your question relates to a classification problem, more than hypothesis testing, even though it could be thought of that way.
You have to consider your spectrum as a $n$-dimension vector ($n$ being either the number of points defining your spectrum, or a discrete sampling of your data if it's continuous).
In that view, what you show on the plot looks like 2 clusters (red and blue), represented by 2 $n$-dimension cluster centers (as vectors); and confidence intervals on whether the spectra should lie if they belong to each family.
Then, you have several ways of dealing with your problem. You could for instance assume that your families are gaussian processes, and given a new spectrum, compute the $n$-dimension vectors of probabilities that each point was generated by a cluster (for both clusters). This would give you a vector of probabilities, and the one with the highest norm would tell you what cluster to put your new spectrum in.
In a more general approach, you could compute the distance between your new vector and each cluster center, according to whatever distance is relevant to your problem (euclidian distance, earth mover's distance...).
If you're trying to determine a "score" function of the fact that a new spectrum was generated by either class, you can use the likelihood approach, by computing $L(\theta|x) = p(x|\theta)$ where $\theta$ represents the distribution itself (shape of distribution at each wavelength), and the set of hyperparameters for this distribution (for instance, means and variances). This is actually about the same as my first proposal, presented in a more formal way.
A: An alternative to Romain's answer is to not look at the spectrum as a vector of size $n$ (to me that seems to give too much problems in finding out how the errors will be correlated and how to deal with those correlated errors to compute probability for a class).
Instead, you could use some dimension reduction technique and use the result of that to define some lower dimensional feature space. In that space you could perform more easily classification. (indirectly the dimension reduction computes the correlation for errors in the larger space)
This method makes sense because you can think of your spectrum as being the linear sum of several features, like presence of certain components, molecules, bonds, or whatever creates the spectrum.
PCA is used a lot in analyzing spectra. 
https://scholar.google.com/scholar?q=pca+spectrum+classification
