Unless you use a specialized camera (e.g. the Betterlight scanning back), the histograms that you’re seeing on the back of your camera are not presented in terms of the primaries of the camera’s native color space. The way that most digital photography experts put it is that the histogram you see on the back of the camera is computed from a JPEG image.
If you’re using a camera that computes the histogram before the exposure is made, like a mirrorless interchangeable lens camera, I don’t believe that the above explanation is strictly accurate, although it’s on the right track. What I think is happening – and the camera manufacturers are not particularly forthcoming, so I don’t know for sure – is that the histogram that you see is derived from part of the image processing chain that produces the JPEG file. I think that the image processing ahead of the histogram computation shares many operations — demosaicing, conversion to a standard color space (in most high-end cameras, the choices are sRGB or Adobe 1998 RGB), white balance, contrast settings, and special effects — with the JPEG processing. To produce the histogram, the camera subsamples (to make the computation easier), and assigns pixels to buckets. To produce the JPEG file, the camera performs the 8×8 discrete cosine transform JPEG compression and formats the data in the standard JPEG file format.
If you’re using a DSLR and using live view, the above applies. If you aren’t using live view, you make the exposure and then you look at the histogram. In that case, even if you have your camera configured to save the image in raw format, it’s likely that you are looking at a histogram created from the JPEG preview image in the raw file.
If you’re trying to use the histogram in the back of the camera to get the correct exposure using the expose-to-the-right (ETTR) method, having the camera present the histogram of the image after extensive processing is not at all what you want. Almost all the time, the camera’s histogram will show clipping at the right side of the image well before the actual raw data is clipped. You can make your histogram less inaccurate by choosing the widest color space available (usually Adobe 1998 RGB), the lowest contrast setting available, and getting the right white balance. It may seem silly to set white balance that will have no effect on the data in your raw file, but you will see a much closer approximation to the true raw histogram, which is what you want to see if you are using the histogram to aid in ETTR exposures.