I'm working on a statistics project and need to evaluate the expected value using hypergeometric distribution. I am unsure which variable to assign with value in the probability and expected values for the following data: "you work for a manufacturer who receives regular supplies from a supplier, the current acceptance sampling scheme involves sampling 20 units, if more than 2 units are defective the lot is rejected.Assumptions are that the lot size is always 500 and that 4% of units produced by the supplier are defective." In the simulation fuction for the current scheme we are evaluating 1000 shipments loads. Then asked to calculate fraction of incoming lots expected rejected and in comparison to simulation results.... I'm really just lloking to what parts I include in my calculation and variable bearing they hold on hypergeometric distribution functions.

To calculate the expected value using the hypergeometric distribution, you need to understand the parameters and variables involved. In this case, you are evaluating a sampling scheme for incoming shipments.

Here are the variables and their interpretations in the context of the hypergeometric distribution:

- Population size (N): The total lot size, which is always 500 in this case.
- Number of successes in the population (K): The number of defective units in the lot. Since 4% of the units produced by the supplier are defective, K would be 500 * 0.04 = 20.
- Sample size (n): The number of units sampled for testing from each shipment. In this case, it is 20 units.
- Number of successes in the sample (k): The number of defective units found in the sample. If more than 2 units are defective, the lot is rejected.

To calculate the fraction of incoming lots expected to be rejected, you need to find the expected value for k (the number of defective units) using the hypergeometric distribution.

To calculate the expected value, you can use the following formula: E(k) = n * (K/N)

In this case, E(k) = 20 * (20/500) = 0.8

Therefore, the expected value of the number of defective units found in a sample of 20 units is 0.8.

To compare this with the simulation results, you would need to perform simulations of 1000 shipment loads using the sampling scheme and count the number of rejected lots. Then, calculate the fraction of rejected lots out of the total 1000 shipments and compare it with the expected value of 0.8.

Remember that the hypergeometric distribution assumes sampling without replacement, so each unit can only be selected once in the sample.

To calculate the expected value using the hypergeometric distribution, you need to define your random variable and its corresponding values. In this case, the random variable represents the number of defective units in a sample of 20 units.

Let's assign the following variable names:
- N: total population size (lot size) which is always 500
- K: number of successes in the population (defective units) which is 4% of 500 (0.04 * 500 = 20)
- n: sample size, which is 20 (constant in this case)

To calculate the fraction of incoming lots expected to be rejected, you need to determine the probability of having more than 2 defective units in a sample of 20. This can be done by summing up the probabilities of having 3, 4, 5, ... up to 20 defective units, using the hypergeometric distribution formula.

The formula for the hypergeometric distribution is as follows:

P(X = k) = ( K choose k ) * ( N - K choose n - k ) / ( N choose n )

Where:
- ( K choose k ) is the number of ways to choose k defective units from a population of K defective units.
- ( N - K choose n - k ) is the number of ways to choose n - k non-defective units from a population of N - K non-defective units.
- ( N choose n ) is the number of ways to choose n units from a population of N units.

To calculate the expected value, you need to compute the sum of the product of each outcome (k) and its corresponding probability (P(X = k)).

In your case, you want to calculate the expected value for 1000 shipment loads, so you would multiply the fraction of incoming lots expected to be rejected by 1000.

To compare the results with the simulation, you would perform the simulation for the same number of shipment loads (1000) and keep track of the number of rejected lots. Then calculate the fraction of rejected lots and compare it to the expected value obtained from the hypergeometric distribution.

I hope this explanation helps you understand the calculations involved with the hypergeometric distribution in your statistics project.