13.16
Wald-Wolfowitz 游程检验,通常称为游程检验,是一种非参数检验,用于评估有序数据的随机性。该检验评估游程数,即数据中相似元素的连续序列。如果游程数明显高于或低于预期,则数据被视为非随机的,表明存在可检测的模式或结构。
对于二元数据,游程使用 + 和 − 符号(或 1 和 0)来标识。对于…
一位科学家收集了30只接近水源的狒狒的身体长度数据。
因此,沃尔德-沃尔夫威茨检验可以确定狒狒接近水源的顺序是否随机,或是否与其体长相关。
此处,零假设表明数据处于随机序列中,而备择假设则表明数据不处于随机序列中。
对于这些数值数据,通过将大于和小于中位数 74.5 的值分别赋予二进制符号,来计算游程—G。
此处,G 的值为 17。
请注意,小于中位数—n1—以及大于中位数—n2—的数值个数均小于20。
因此,可以在标准表格中查得 α = 0.05 时的临界值。
瓦尔德-沃尔福威茨检验是双尾检验。因此,要拒绝随机性假设,检验统计量必须超出临界值的范围。
此处,G 落在此范围内,为零假设提供了支持证据。
View the full transcript and gain access to JoVE Core videos
Q1: What is the purpose of the Wald-Wolfowitz runs test?
The Wald-Wolfowitz runs test assesses whether ordered data follows a random sequence or exhibits a detectable pattern. It evaluates the number of runs—consecutive sequences of similar elements—in the data. If the observed number of runs significantly deviates from expected values, the data is considered non-random, indicating an underlying structure or relationship between variables.
Q2: How are numerical data converted for the runs test?
Numerical data are converted by assigning binary signs based on a threshold, typically the median. Values above the median receive a plus sign, while values below receive a minus sign. This binary conversion enables identification of runs within the data. For example, baboon body lengths were compared against a median of 74.5 to create a sequence of signs for analysis.
Q3: What do the null and alternative hypotheses represent in a runs test?
The null hypothesis states that data follow a random sequence with no underlying pattern. The alternative hypothesis states that data are not random and exhibit a specific order or structure. The test determines which hypothesis the observed number of runs supports by comparing it against critical values from a standard table.
Q4: When should you use critical values from a standard table versus z-scores?
Use critical values from a standard table when both n1 (elements with one characteristic) and n2 (elements with another characteristic) are less than or equal to 20, and the significance level is α = 0.05. When these conditions are not met—such as when n1 or n2 exceed 20 or when using a different significance level—calculate the test statistic z using mean and standard deviation formulas instead.
Q5: How do you interpret runs test results?
If the observed number of runs falls outside the critical range, reject the null hypothesis and conclude the data is non-random with a detectable pattern. If the number of runs falls within the critical range, fail to reject the null hypothesis, suggesting the data is likely random. The test is two-tailed, meaning randomness is rejected when runs are either too high or too low.
Q6: What types of data can the runs test analyze?
The runs test analyzes binary data using symbols like plus and minus, categorical data with two categories converted to binary form, and numerical data thresholded at the mean or median. It also applies directly to inherent categorical sequences such as DNA bases (A, T, G, C) without conversion. The test's versatility makes it suitable for various sequential data types.
Q7: What are the limitations of the runs test?
While the runs test is unaffected by sample size or population distribution, making it versatile for sequential data, it cannot measure the degree or magnitude of randomness. It only identifies whether a sequence is random or non-random. The test detects the presence of patterns but does not quantify how strong or pronounced those patterns are.