Final answer:
The number of ways to select a sample of 7 keyboards with exactly two having an electrical defect is 61,776. The probability of selecting a sample with at least 6 keyboards having a mechanical defect is 0.00195.
Step-by-step explanation:
(a) To select a sample of 7 keyboards with exactly two having an electrical defect, we need to consider the number of ways we can choose 2 keyboards with electrical defects and 5 keyboards without electrical defects. The number of ways to select 2 out of 13 electrical defects is C(13, 2) = 78. The number of ways to select 5 out of the remaining 12 keyboards without electrical defects is C(12, 5) = 792. Therefore, the total number of ways to select a sample of 7 keyboards with exactly two having an electrical defect is 78 * 792 = 61776.
(b) To find the probability that at least 6 out of 7 randomly selected keyboards have a mechanical defect, we need to consider the number of ways we can choose 6 or 7 keyboards with mechanical defects and 1 or 0 keyboards without mechanical defects. The number of ways to select 6 out of 12 keyboards with mechanical defects is C(12, 6) = 924. The number of ways to select 1 out of the 13 remaining keyboards is C(13, 1) = 13. Therefore, the total number of ways to select a sample of 7 keyboards with at least 6 having a mechanical defect is 924 + 13 = 937. The total number of ways to select a sample of 7 keyboards from the 25 available keyboards is C(25, 7) = 480,700. Therefore, the probability of selecting a sample with at least 6 keyboards having a mechanical defect is 937 / 480700 = 0.00195 (rounded to four decimal places).