CertSafari
    Snowflake SnowPro Advanced: Data Scientist (DSA-C03)· Lessons

    Domain 1 · Lesson 4/16

    Statistical Concepts: Distributions, CLT, Z/T Tests, Bootstrap, CIs

    Define statistical concepts for data science.

    16 min read
    4.25% of exam
    10 sources
    Published 6 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Tell a normal distribution from a skewed one using mean, median, SKEW and the empirical rule, and pick a robust summary when outliers are present
    • Explain what the central limit theorem says about sample means, and what it does not say about raw data
    • Choose between a z-test and a t-test, and keep a z-score outlier flag separate from a hypothesis test
    • Describe how bootstrapping builds a sampling distribution by resampling with replacement, and why Snowflake's SAMPLE clause on its own is not a bootstrap
    • Build and interpret a confidence interval for a mean using the standard error, not the standard deviation

    Key concept

    Standard deviation vs. standard error — The standard deviation measures how spread out the individual values in a sample are. The standard error measures how much a statistic, such as the mean, would vary from one sample to the next. For the mean it equals the standard deviation divided by the square root of n. The central limit theorem, z and t tests, bootstrapping and confidence intervals all describe the standard error, not the raw spread.

    1.Normal versus skewed distributions: mean, median and outliers

    Every later idea in this lesson assumes you know the shape of your data. A normal distribution is symmetric and bell-shaped. Its mean, median and mode all sit at the centre, and how likely a value is depends only on how far it is from that centre. Snowflake's NORMAL data-generation function lets you see this. You give it a mean and a standard deviation, and many calls trace out the bell curve. The documentation states the empirical rule directly: with mean 0 and standard deviation 1, about 68.2% of values fall between -1 and +1. The rest of the rule, which comes from general statistics rather than this page, is that about 95% of values fall within 2 standard deviations and about 99.7% within 3.

    Drawing five values from a standard normal distribution (mean 0, standard deviation 1)sql
    SELECT normal(0, 1, random()) FROM table(generator(rowCount => 5));

    Checkpoint 1 of 9· Exam question

    A data scientist studies session durations in a clickstream table. The population distribution is strongly right-skewed. She draws 2,000 random samples of 60 sessions each and computes every sample's mean. What does the histogram of those 2,000 means look like?

    Real business columns are rarely that tidy. Income, basket size, session length and claim amounts are usually right-skewed: most values are modest, and a long tail of large values pulls the mean up. The quickest test for skew is to compare the mean and the median. If the mean is well above the median, the data is right-skewed. If it is well below, the data is left-skewed. Snowflake's SKEW aggregate gives you a number for it. It is about 0 for symmetric data, positive for a right tail and negative for a left tail, and it needs at least three non-NULL records. As a rough guide, an absolute value above about 1 means strong skew.

    Skew matters because the mean and the standard deviation are both pulled by the tail. A few extreme values can move the mean a long way from a typical row, while the median barely moves. Snowflake's MEDIAN data metric function says this in its own description. The usual responses to a heavily skewed feature are to report the median or a percentile instead of the mean, to apply a log or similar transform before modelling, and to look at the outliers to decide whether they are errors or real, informative extremes. Simply deleting them is not the default.

    Checkpoint 2 of 9· Check yourself

    A salary column has a long right tail. You need one number for a dashboard that describes a typical employee. Which summary should you pick?

    Checkpoint 3 of 9· Exam question

    A fraud analyst reviews card transaction amounts in which a handful of corporate-card payments are extremely large. Select TWO statistics that stay stable when a few more extreme values are appended to the data.(Select 2)

    Sources123

    2.The central limit theorem: why sample means behave

    If so much real data is skewed, why do confidence intervals and z and t tests rely on the normal curve? The answer is the central limit theorem (CLT). Take repeated random samples of size n from almost any population with a finite variance and compute each sample's mean. As n grows, the distribution of those means gets closer and closer to a normal distribution. Its centre is the population mean and its spread is sigma divided by the square root of n. That spread is the standard error.

    Note what the CLT is about: the distribution of a statistic, not the data. The raw column stays exactly as skewed as it was. Only the sampling distribution of the mean becomes approximately normal. A common rule of thumb is that n of about 30 is enough for moderately skewed data. Heavy tails need larger samples. The square root of n also tells you what more data buys: to halve the standard error you need four times as many rows.

    You can watch the CLT happen in Snowflake. UNIFORM produces values that are flat across a range, which is clearly not a bell. Generate many rows, put them into groups of, say, 30, take AVG per group and plot those averages. The raw draws stay flat, but the group averages pile up in a bell around the midpoint.

    Raw uniform draws: the non-normal input for a CLT simulationsql
    SELECT UNIFORM(1, 10, RANDOM()) FROM TABLE(GENERATOR(ROWCOUNT => 5));

    Checkpoint 4 of 9· Check yourself

    You generate a million values with UNIFORM(1, 10, RANDOM()), bucket them into groups of 50 and average each group. Which statement is correct?

    Sources4

    3.Z and T tests: standardizing against the right yardstick

    Because sample means are approximately normal, you can ask how surprising an observed mean is. Both tests standardize the same way: (observed statistic minus hypothesized value) divided by its standard error. The difference is where that standard error comes from.

    A z-test assumes the population standard deviation is known, or the sample is large enough that the sample estimate is effectively exact. The statistic is compared with the standard normal, so the two-sided 5% cut-off is plus or minus 1.96. A t-test is the usual choice when the standard deviation is estimated from the same sample, which is what Snowflake's STDDEV returns. Estimating sigma adds uncertainty, so the t-distribution has heavier tails than the normal and depends on degrees of freedom (n minus 1 for a one-sample test). With 10 rows the two-sided 5% cut-off is about 2.26, not 1.96. As n grows, t approaches z. Common variants are the one-sample test (mean against a target), the two-sample test (A vs. B; Welch's version does not assume equal variances) and the paired test (before vs. after on the same units). In each case a small p-value means the observed difference would be unlikely if the null hypothesis were true. It does not measure how large or how important the effect is.

    Don't confuse these tests with a z-score on a single row. Snowflake's OUTLIER_ZSCORE_COUNT and EXTREME_OUTLIER_ZSCORE_COUNT data metric functions standardize each value by the column mean and standard deviation and count values more than 3 or 4.5 standard deviations out. That is a data-quality screen on individual rows. It tests no hypothesis about a mean, and on a skewed column it will flag the legitimate long tail.

    Checkpoint 5 of 9· Check yourself

    SNOWFLAKE.CORE.OUTLIER_ZSCORE_COUNT on a sensor_reading column returns 57. What does that result establish?

    Sources567

    4.Bootstrapping: a sampling distribution without a formula

    Z and t tests work because there is a formula for the standard error of a mean. For a median, a ratio, a 90th percentile or a model metric, that formula is either messy or doesn't exist. Bootstrapping replaces the formula with computation. Treat your sample of n rows as a stand-in for the population. Draw n rows from it with replacement, so some rows appear twice and others not at all. Compute the statistic, and repeat this B times (often 1,000 to 10,000). The spread of the B results estimates the standard error. The 2.5th and 97.5th percentiles of those results give a 95% percentile confidence interval.

    Bootstrapping needs no normality assumption, which suits skewed data. It cannot fix a sample that is unrepresentative or very small, though, because every resample only reuses the rows you already have. With replacement is essential: without it, each resample of size n would just be the original sample in a different order.

    That coin flip is why Snowflake's SAMPLE / TABLESAMPLE clause is not a bootstrap by itself. BERNOULLI (ROW) sampling includes each row with probability p/100. A row is either in or out, so it can never appear twice, and the result is a random subset smaller than the table. That is useful for exploring a large table or building a train/validation split, but it is sampling without replacement. A real bootstrap needs draws with replacement: either random row positions generated with UNIFORM and RANDOM and joined back to the data, or, more commonly, a resampling loop in Python over data pulled from Snowflake. For reproducible results, fix the seed. SAMPLE accepts one only for SYSTEM/BLOCK sampling.

    Checkpoint 6 of 9· Fill the gap

    This documented query uses block-level sampling with a fixed seed. SEED is supported only for one family of sampling methods. Which keyword fills the blank?

    SELECT * FROM testtable SAMPLE  ?  (3) SEED (82);

    Sources8

    5.Confidence intervals: estimate plus or minus the standard error

    Everything so far comes together here. A confidence interval is a point estimate plus or minus a critical value times the standard error. For a mean, that is the sample mean plus or minus z* (or t*) times s divided by the square root of n. For a 95% interval z* is 1.96, and t* is a little larger when n is small. In Snowflake, s is STDDEV and n is COUNT, so the half-width is 1.96 * STDDEV(x) / SQRT(COUNT(x)). If you leave out the division by the square root of n, you get an interval for where individual rows fall, not for where the mean is. It will be far too wide.

    Checkpoint 7 of 9· Fill the gap

    This documented example returns 4 for the values 6, 10 and 14. That is the sample standard deviation, which is the s you divide by the square root of n. Which function fills the blank?

    CREATE TABLE t1 (c1 INTEGER);
    INSERT INTO t1 (c1) VALUES
      (6),
      (10),
      (14);
    SELECT  ? (c1) FROM t1;

    Interpret the interval correctly. "95% confident" describes the procedure: if you repeated the sampling many times, about 95% of the intervals built this way would contain the true parameter. It does not mean 95% of the data lies inside the interval, and it does not mean there is a 95% probability that this particular interval contains the parameter. Three things control the width: higher confidence makes it wider, more spread (larger s) makes it wider, and a larger n makes it narrower in proportion to the square root of n. When no simple formula exists, a bootstrap percentile interval from the previous section answers the same question.

    Snowflake reports confidence intervals itself when you monitor models. MODEL_MONITOR_PERFORMANCE_METRIC can return a CI_VALUE column holding a 95% interval as lower and upper bounds. It uses a method suited to each kind of metric: the Wilson interval for proportion-style classification metrics and the Wald interval for error metrics. A wide CI_VALUE on a small monitoring window is a warning not to over-read a change in the metric.

    Which confidence-interval method MODEL_MONITOR_PERFORMANCE_METRIC reports in CI_VALUE
    Performance metricsCI_VALUE method
    CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE, MICRO_AVERAGE_PRECISION, MICRO_AVERAGE_RECALLWilson CI
    MSE, RMSE, MAEWald CI
    Other performance metricsNULL

    Checkpoint 8 of 9· Check yourself

    You query MODEL_MONITOR_PERFORMANCE_METRIC for RMSE on a regression model. What does the CI_VALUE column contain?

    Checkpoint 9 of 9· Exam question

    A retail data scientist runs a query on a Snowflake `ORDERS` table and gets `AVG(order_total)` = 182, `MEDIAN(order_total)` = 64 and `SKEW(order_total)` = 4.1. The dashboard needs one KPI describing a typical order. Which summary is the MOST appropriate?

    Sources910

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A 95% confidence interval for a mean is AVG(x) plus or minus 1.96 * STDDEV(x).Why is that wrong?

      STDDEV measures how spread out individual values are. The interval for the mean uses the standard error, STDDEV(x) / SQRT(COUNT(x)). Without that division, the interval is wider by a factor of the square root of n.

      Covered in Confidence intervals: estimate plus or minus the standard error

    2. 2.Running SAMPLE (n) repeatedly on a table is a bootstrap.Why is that wrong?

      Bernoulli sampling flips a coin for each row, so it returns a subset without replacement and no row ever appears twice. A bootstrap draws n rows with replacement from the sample.

      Covered in Bootstrapping: a sampling distribution without a formula

    3. 3.The mean is the best single summary of a typical value, whatever the column's shape.Why is that wrong?

      In a skewed column the tail pulls the mean away from a typical row. The median, or a log transform before modelling, gives a more representative centre.

      Covered in Normal versus skewed distributions: mean, median and outliers

    4. 4.A non-zero OUTLIER_ZSCORE_COUNT is a significance test showing that the data contains errors.Why is that wrong?

      The function only counts values more than three standard deviations from the mean. It is a screen on individual rows, not a z-test of a hypothesis, and on skewed data it flags real tail values.

      Covered in Z and T tests: standardizing against the right yardstick

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “approximately 68.2% of returned values from multiple calls will be between -1.0 and +1.0”
      ↩︎ Normal versus skewed distributions: mean, median and outliers
    2. 2.
      “Intuitively, skew describes how asymmetric the underlying distribution is.”
      ↩︎ Normal versus skewed distributions: mean, median and outliers
      “For inputs with fewer than three records, SKEW returns NULL.”
      ↩︎ Normal versus skewed distributions: mean, median and outliers
    3. 3.
      “The median is more robust than the average for columns with skewed distributions.”
      ↩︎ Normal versus skewed distributions: mean, median and outliers
      “The median is more robust than the average for columns with skewed distributions.”
      ↩︎ Exam trap 3
    4. 4.
      “Generates a uniformly-distributed pseudo-random number in the inclusive range [min, max].”
      ↩︎ The central limit theorem: why sample means behave
    5. 5.
      “counts values whose absolute difference from the mean is more than 3 standard deviations (a Z-score greater than 3)”
      ↩︎ Z and T tests: standardizing against the right yardstick
      “counts values whose absolute difference from the mean is more than 3 standard deviations (a Z-score greater than 3)”
      ↩︎ Exam trap 4
    6. 6.
      “This is a wider threshold than OUTLIER_ZSCORE_COUNT uses, so it flags only the most extreme values.”
      ↩︎ Z and T tests: standardizing against the right yardstick
    7. 7.
      “Returns the sample standard deviation (square root of sample variance) of non-NULL values.”
      ↩︎ Z and T tests: standardizing against the right yardstick
      “Returns the sample standard deviation (square root of sample variance) of non-NULL values.”
      ↩︎ Key concept
      “Returns the sample standard deviation (square root of sample variance) of non-NULL values.”
      ↩︎ Exam trap 1
    8. 8.
      “Includes each row with a probability of p/100. This method is similar to flipping a weighted coin for each row.”
      ↩︎ Bootstrapping: a sampling distribution without a formula
      “This parameter only applies to SYSTEM and BLOCK sampling.”
      ↩︎ Bootstrapping: a sampling distribution without a formula
      “Includes each row with a probability of p/100. This method is similar to flipping a weighted coin for each row.”
      ↩︎ Exam trap 2
      “the number of rows returned isn’t exactly equal to (p/100)*n rows, but it is close to this value”
      ↩︎ Prediction
    9. 9.
      “95% confidence interval with lower and upper bounds.”
      ↩︎ Confidence intervals: estimate plus or minus the standard error
      “Wilson CI for CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE, MICRO_AVERAGE_PRECISION, and MICRO_AVERAGE_RECALL; Wald CI for MSE, RMSE, and MAE.”
      ↩︎ Checkpoint
    10. 10.
      “Note that the functions STDDEV and STDDEV_SAMP do not return the same result as STDDEV_POP.”
      ↩︎ Confidence intervals: estimate plus or minus the standard error

    Ready to test yourself?

    Practise the 16 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.