Python Code to Plot F-distribution Density Function

import numpy as npimport matplotlib.pyplot as pltfrom scipy import statsdef plot_f_distribution(df1, df2, alpha=0.05): # Create x values for the plot x = np.linspace(0, 5, 1000) # Calculate F-distribution values y = stats.f.pdf(x, df1, df2) # Calculate critical F-value f_crit = stats.f.ppf(1 – alpha, df1, df2) # Create the plot plt.figure(figsize=(10, 6)) # Add solid black … Read more

F-Distribution Critical Value Table

The following is the F Distribution Critical Value Table. The numbers in the table are critical values for F distribution with probably p in right tail of the distribution (see the figure illustration below). F Distribution Critical Values df2 p-value df1 (Degrees of freedom in numerator) 1 2 3 4 5 6 7 8 12 … Read more

WordPress on Google Cloud: Access phpMyAdmin and files

Unlike some typical WordPress host companies, there is no direct page on Google Cloud to access phpMyAdmin and WordPress files. In this post, I will provide a quick summary of the methods. phpMyAdmin for WordPress on Google Cloud For more information, you can refer to this following YouTube video (not mine). Access WordPress files on … Read more

Dog Names: A List for Boy and Girl Puppies

To help you find inspiration, we’ve compiled a list of the 100 popular dog names, along with a brief explanation of why each name is loved by dog owners. Whether you’re looking for something classic, trendy, or unique, this list has something for every pup and personality. From names inspired by beloved characters to those … Read more

Calculate Sample Size for Chi-square Test

This tutorial shows how you can calcuate sample size for one variable chi-square test here. The example in this tutorial is that a marketing agency tests two versions of packaging (A version vs. B Version). The null hypothesis is that there is no difference between these two versions, and the alternative hypothesis is that there … Read more

Fisher’s LSD (Least Significant Different) in R

This tutorial shows how to do the post hoc test using Fisher’s LSD (Least Significant Different) in R. When to use Fisher’s LSD  Typically, it is when you are doing one-way ANOVA with more than 2 groups (e.g., 3 groups). Further, you should note that Fisher’s LSD is the most liberal of all post hoc tests. … Read more

Can you use one-way ANOVA for three groups?

Can you use one-way ANOVA for three groups? Yes, you can use one-way ANOVA for three groups (or, three levels). Actually, one-way ANOVA can be used for 2 groups and more than 2 groups. Example of one-way ANOVA for three groups The following is a hypothetical data example for one-way ANOVA for three groups generated … Read more

Setup Hayes PROCESS in R (4 Steps)

The following shows steps of setup Hayes Mediation PROCESS in R. After setting up the PROCESS in R, we can use Model 4 as a simple example. In the following R code, we first download the data from GitHub. Then, run it using the process(). After running the R code above, you should see the … Read more

Meaning of Hessian Matrix from optim() in R

The inverse of the Hessian matrix from optim() can be used as the asymptotic covariance matrix for estimated parameters. The name “asymptotic” is due to the direct replace the σ2 in the variance of estimated parameters with the estimated one, namely \( \hat{\sigma}^2\). If the sample size is large enough, t-distribution will be very close … Read more