Using ONLY the historical Mega Millions table I supply below (columns: draw_date, n1, n2, n3, n4, n5, Mega Ball, complete the five tasks that follow.  
Definitions  
• recent_window = last 50 drawings  
• trending = number appears ≥2 times within recent_window  
• overdue = number has NOT appeared in the last 25 drawings  
• higher_than_prev = value > the same‐position value in the immediately preceding draw  

Tasks  
1. Descriptive stats  
   • For each main-ball position (n1–n5) compute min, Q1, median, Q3, max.  
   • Flag statistical outliers using the IQR rule and EXCLUDE them from later steps.  

2. Top frequencies  
   • For each position list the 15 highest-frequency numbers (break ties by most recent appearance), with counts.  

3. Transition probabilities  
   • For each position calculate the empirical probabilities that the next draw is higher_than_prev, lower_than_prev, or equal (use entire history).  
   • Also compute these probabilities for the Mega Ball (1–24).  

4. Candidate pools  
   • For each position build a candidate set consisting of numbers that are trending OR overdue.  
   • If a number appeared in the last 3 drawings, include it ONLY if it is trending.  
   • Label each candidate “trending”, “overdue”, or “both”.  

5. Prediction for drawing dated 2025-07-18  
   • Select one number from each candidate set, weighted by:  
        – its frequency rank from Task 2 (higher = heavier)  
        – the transition probabilities from Task 3  
   • Do the same for the Mega Ball.  
   • Output the recommended ticket with the five main numbers in ascending order.  
   • Provide two alternates in case the primary pick duplicates another player’s ticket.

Historical Drawings:

Date	Number 1	Number 2	Number 3	Number 4	Number 5	MB
7/15/2025	6	10	24	35	43	1
7/11/2025	12	23	24	31	56	1
7/8/2025	4	6	38	44	62	24
7/4/2025	17	20	24	41	42	24
7/1/2025	19	28	31	39	54	5
6/27/2025	18	21	29	42	50	2
6/24/2025	10	11	18	24	60	20
6/20/2025	26	49	58	61	63	9
6/17/2025	16	23	39	46	55	12
6/13/2025	8	10	22	40	47	1
6/10/2025	10	11	14	38	45	24
6/6/2025	16	40	54	56	57	3
6/3/2025	16	24	29	36	45	13
5/30/2025	2	28	37	38	58	13
5/27/2025	6	28	34	48	62	9
5/23/2025	7	18	40	55	68	18
5/20/2025	18	30	33	55	64	11
5/16/2025	2	22	42	62	66	14
5/13/2025	6	29	33	47	68	20
5/9/2025	9	10	12	48	60	16
5/6/2025	16	17	43	46	58	16
5/2/2025	14	37	40	41	68	2
4/29/2025	16	33	40	51	57	10
4/25/2025	38	40	60	62	70	9
4/22/2025	25	39	49	52	65	22
4/18/2025	5	13	15	17	18	1
4/15/2025	6	10	13	24	63	2
4/11/2025	15	37	38	56	58	19
4/8/2025	10	16	50	60	61	17
4/4/2025	11	28	35	37	69	25
4/1/2025	11	12	21	29	49	3
3/28/2025	2	9	31	60	63	23
3/25/2025	1	5	17	39	62	8
3/21/2025	15	22	31	52	57	1
3/18/2025	27	28	31	32	33	24
3/14/2025	3	17	39	42	70	1
3/11/2025	1	19	26	38	69	15
3/7/2025	8	20	48	58	60	7
3/4/2025	14	19	47	52	70	6
2/28/2025	9	19	30	35	66	16
2/25/2025	4	8	11	32	52	13
2/21/2025	1	13	28	37	46	10
2/18/2025	1	20	25	58	61	22
2/14/2025	11	19	31	49	56	16
2/11/2025	7	30	39	41	70	13
2/7/2025	4	24	32	41	55	16
2/4/2025	14	24	31	53	54	1
1/31/2025	9	28	48	56	63	2
1/28/2025	10	19	31	47	56	6
1/24/2025	8	12	43	52	62	18
1/21/2025	27	30	56	64	65	22
1/17/2025	8	10	37	54	69	22
1/14/2025	4	14	35	49	62	6
1/10/2025	9	23	39	65	66	22
1/7/2025	20	24	33	39	48	18
1/3/2025	20	42	46	59	69	19
12/31/2024	13	22	27	29	35	1
12/27/2024	3	7	37	49	55	6
12/24/2024	11	14	38	45	46	3
12/20/2024	2	20	51	56	67	19
12/17/2024	56	66	67	68	69	18
12/13/2024	36	43	52	58	65	16
12/10/2024	12	14	26	48	52	21
12/6/2024	16	21	33	39	45	24
12/3/2024	52	60	61	66	67	23
11/29/2024	3	29	34	37	38	17
11/26/2024	5	24	22	39	42	3
11/22/2024	13	20	26	32	65	2
11/19/2024	5	17	35	55	69	8
11/15/2024	18	31	33	64	68	19
11/12/2024	25	28	42	64	69	17
11/8/2024	25	28	42	64	69	19
11/5/2024	2	24	25	52	58	9
11/1/2024	11	22	42	46	51	4
10/29/2024	16	22	26	36	56	1
10/25/2024	23	26	35	41	43	7
10/22/2024	8	43	48	58	60	4
10/18/2024	4	9	26	39	58	23
10/15/2024	22	34	44	54	62	3
10/11/2024	3	10	29	52	57	20
10/8/2024	3	19	20	22	66	9
10/4/2024	21	39	42	43	45	3
10/1/2024	27	35	47	50	66	25
9/27/2024	29	46	53	46	70	23
9/24/2024	29	46	53	69	70	18
9/20/2024	20	21	40	49	55	11
9/17/2024	14	31	48	57	64	9
9/13/2024	21	55	56	57	66	1
9/10/2024	1	2	16	24	66	6
9/6/2024	6	23	41	59	63	25
9/3/2024	12	41	43	52	55	9
8/30/2024	10	17	20	24	54	8
8/27/2024	16	18	21	54	65	5
8/23/2024	28	30	44	66	69	2
8/20/2024	28	30	44	66	69	2
8/16/2024	22	38	48	51	61	5
8/13/2024	34	55	59	65	70	12
8/9/2024	12	32	38	40	47	21
8/6/2024	23	29	36	61	70	22
8/2/2024	6	7	24	44	54	13
7/30/2024	19	23	30	33	50	25
7/26/2024	2	14	33	58	65	3
7/23/2024	3	9	14	26	51	21
7/19/2024	10	17	23	50	67	3
7/16/2024	5	35	42	58	66	22
7/12/2024	15	35	48	53	68	8
7/9/2024	21	26	54	60	64	3
7/5/2024	6	15	32	54	67	4
7/2/2024	4	8	19	31	45	11
6/28/2024	28	31	33	42	66	24
6/25/2024	3	16	27	47	62	8
6/18/2024	21	22	50	55	67	20
6/14/2024	1	25	26	31	65	2
6/11/2024	1	5	7	22	24	8
6/7/2024	3	5	12	22	66	7
6/4/2024	19	37	40	63	69	17
5/31/2024	4	11	23	33	49	23
5/28/2024	12	18	48	57	62	4
5/24/2024	46	54	56	67	70	16
5/21/2024	2	5	8	28	69	14
5/17/2024	8	17	40	60	70	3
5/14/2024	13	19	43	62	64	6
5/10/2024	13	22	26	32	65	18
5/7/2024	26	28	36	63	66	15
5/3/2024	6	13	15	53	56	11
4/30/2024	10	18	27	37	61	5
4/26/2024	15	23	53	57	61	9
4/23/2024	11	17	33	39	43	14
4/19/2024	19	30	34	46	58	3
4/16/2024	21	26	36	44	59	2
4/12/2024	1	12	14	18	66	16
4/9/2024	34	43	51	52	69	25
4/5/2024	20	30	54	63	65	14
4/2/2024	10	50	56	60	66	19
3/29/2024	11	30	33	38	60	16
3/26/2024	7	11	22	29	38	4
3/22/2024	3	8	31	35	44	16
3/19/2024	24	46	49	62	66	7
3/15/2024	13	25	50	51	66	6
3/12/2024	2	16	31	57	64	24
3/8/2024	19	20	22	47	58	1
3/5/2024	2	49	50	61	70	14
3/1/2024	15	33	37	55	61	24
2/27/2024	6	18	26	27	49	4
2/23/2024	4	6	40	41	60	11
2/20/2024	5	45	55	58	68	7
2/16/2024	19	23	39	42	67	18
2/13/2024	1	3	19	25	58	20
2/9/2024	17	22	29	46	69	1
2/6/2024	2	10	31	44	57	10
2/2/2024	11	22	42	64	69	18
1/30/2024	3	5	16	58	59	11
1/26/2024	14	31	34	50	61	13
1/23/2024	21	28	58	69	70	20
1/19/2024	1	9	16	17	30	17
1/16/2024	2	10	42	49	54	13
1/12/2024	19	34	35	45	67	7
1/9/2024	12	15	32	33	53	24
1/5/2024	5	23	26	38	44	25
1/2/2024	3	18	27	29	64	1
12/29/2023	11	27	30	62	70	10
12/26/2023	8	10	22	58	64	21
12/22/2023	10	26	36	54	69	4
12/19/2023	17	26	50	58	61	11
12/15/2023	10	20	28	40	54	12
12/12/2023	8	23	44	45	53	3
12/8/2023	21	26	53	66	70	13
12/5/2023	18	35	40	64	67	18
12/1/2023	12	47	49	52	65	12
11/28/2023	27	37	42	59	61	11
11/24/2023	6	15	45	59	68	1
11/21/2023	17	22	25	30	38	24
11/17/2023	6	12	31	33	69	17
11/14/2023	29	35	59	61	69	22
11/10/2023	13	33	59	68	70	8
11/7/2023	3	11	33	42	52	20
11/3/2023	15	32	38	47	65	12
10/31/2023	14	35	37	55	70	15
10/27/2023	11	32	43	57	70	6
10/24/2023	16	20	30	54	59	7
10/20/2023	7	29	36	49	61	22
10/17/2023	5	6	29	32	61	20
10/13/2023	6	18	44	46	68	18
10/10/2023	3	8	17	46	63	7
10/6/2023	12	24	46	57	66	22
10/3/2023	3	19	32	39	59	24
9/29/2023	18	40	47	55	64	11
9/26/2023	15	30	35	42	60	16
9/22/2023	10	13	14	57	66	3
9/19/2023	6	9	13	29	66	24
9/15/2023	5	13	29	50	53	25
9/12/2023	2	14	21	42	67	18
9/8/2023	3	12	17	51	62	1
9/5/2023	3	43	50	51	65	13
9/1/2023	10	31	42	43	55	8
8/29/2023	9	39	52	61	63	25
8/25/2023	12	23	26	31	38	2
8/22/2023	1	12	26	36	50	7
8/18/2023	10	20	29	44	66	11
8/15/2023	18	39	42	57	63	7
8/11/2023	8	9	18	35	41	18
8/8/2023	13	19	20	32	33	14
8/4/2023	11	30	45	52	56	20
8/1/2023	8	24	30	45	61	12
7/28/2023	5	10	28	52	63	18
7/25/2023	3	5	6	44	61	25
7/21/2023	29	40	47	50	57	25
7/18/2023	19	22	31	37	54	18
7/14/2023	10	24	48	51	66	15
7/11/2023	10	17	33	51	64	5
7/7/2023	8	10	17	55	66	3
7/4/2023	21	33	54	61	67	12
6/30/2023	13	22	47	51	55	9
6/27/2023	8	34	35	41	52	12
6/23/2023	13	62	65	67	69	14
6/20/2023	6	37	39	45	46	21
6/16/2023	4	24	34	45	57	19
6/13/2023	8	10	19	44	47	4
6/9/2023	3	19	53	60	68	13
6/6/2023	6	12	23	29	57	4
6/2/2023	3	16	19	36	60	25
5/30/2023	13	16	40	64	68	21
5/26/2023	12	20	37	41	64	1
5/23/2023	3	10	22	65	66	19
5/19/2023	5	11	41	44	55	14
5/16/2023	15	34	36	69	70	17
5/12/2023	1	2	23	40	45	15
5/9/2023	4	37	46	48	51	19
5/5/2023	16	18	28	42	43	11
5/2/2023	3	15	16	32	41	9
4/28/2023	18	38	53	62	64	20
4/25/2023	8	29	46	47	48	12
4/21/2023	3	21	29	46	63	9
4/18/2023	7	9	15	19	25	4
4/14/2023	23	27	41	48	51	22
4/11/2023	31	35	53	54	55	24
4/7/2023	12	32	49	51	66	21
4/4/2023	1	37	45	62	64	4
3/31/2023	16	26	27	42	61	23
3/28/2023	2	3	18	32	68	24
3/24/2023	14	17	33	42	66	15
3/21/2023	1	21	25	27	40	11
3/17/2023	26	28	29	39	49	25
3/14/2023	1	7	23	38	55	2
3/10/2023	9	20	59	60	63	5
3/7/2023	15	22	25	28	69	21
3/3/2023	8	25	36	39	67	11
2/28/2023	14	16	40	52	59	13
2/24/2023	2	22	49	65	67	7
2/21/2023	2	15	30	36	63	24
2/17/2023	2	33	38	57	70	13
2/14/2023	23	24	35	40	43	1
2/10/2023	20	29	30	52	58	19
2/7/2023	9	15	46	55	57	4
2/3/2023	1	4	50	54	59	17
1/31/2023	7	9	18	29	39	13
1/27/2023	4	43	46	47	61	22
1/24/2023	33	41	47	50	62	20
1/20/2023	20	29	31	64	66	17
1/17/2023	2	12	18	24	39	18
1/13/2023	30	43	45	46	61	14
1/10/2023	7	13	14	15	18	9
1/6/2023	3	20	46	59	63	13
1/3/2023	25	29	33	41	44	18
12/30/2022	1	3	6	44	51	7
12/27/2022	9	13	36	59	61	11
12/23/2022	15	21	32	38	62	8
12/20/2022	3	4	33	36	52	17
12/16/2022	8	35	40	53	56	11
12/13/2022	14	22	48	58	68	6
12/9/2022	8	19	53	61	69	19
12/6/2022	15	16	19	28	47	13
12/2/2022	1	21	36	46	52	16
11/29/2022	20	23	37	46	52	6
11/25/2022	29	31	46	54	67	18
11/22/2022	13	23	24	25	43	2
11/18/2022	2	14	16	38	66	9
11/15/2022	6	19	28	46	61	18
11/11/2022	1	5	17	37	70	22
11/8/2022	5	13	29	38	59	23
11/4/2022	2	20	47	55	59	19
11/1/2022	5	9	15	16	17	25
10/28/2022	4	18	31	53	69	7
10/25/2022	21	30	35	45	66	21
10/21/2022	34	36	43	45	68	22
10/18/2022	1	15	20	44	67	23
10/14/2022	9	22	26	41	44	19
10/11/2022	3	7	11	13	38	1
10/7/2022	6	11	29	36	55	21
10/4/2022	15	18	25	33	38	25
9/30/2022	16	26	37	40	51	6
9/27/2022	8	14	24	43	51	9
9/23/2022	5	50	53	58	64	22
9/20/2022	9	21	28	30	52	10
9/16/2022	15	30	35	38	66	12
9/13/2022	14	25	38	59	64	21
9/9/2022	16	21	54	55	69	22
9/6/2022	6	17	46	59	68	2
9/2/2022	39	40	52	60	67	20
8/30/2022	2	38	55	57	65	17
8/26/2022	6	27	30	38	64	23
8/23/2022	3	5	47	48	67	7
8/19/2022	12	18	24	46	65	3
8/16/2022	33	35	41	45	51	1
8/12/2022	23	24	50	54	64	3
8/9/2022	1	8	10	25	32	13
8/5/2022	2	5	29	64	69	18
8/2/2022	10	14	25	37	63	14
7/29/2022	13	36	45	57	67	14
7/26/2022	7	29	60	63	66	15
7/22/2022	14	40	60	64	66	16
7/19/2022	2	31	32	37	70	25
7/15/2022	8	20	26	53	64	15
7/12/2022	4	7	10	45	64	12
7/8/2022	20	36	61	62	69	20
7/5/2022	27	31	50	51	61	21
7/1/2022	1	27	29	38	62	12
6/28/2022	7	12	21	43	55	11
6/24/2022	1	7	11	25	56	14
6/21/2022	8	13	18	32	42	20
6/17/2022	20	36	53	56	69	16
6/14/2022	30	37	38	42	58	22
6/10/2022	3	12	14	18	32	4
6/7/2022	4	34	40	41	53	3
6/3/2022	11	16	22	48	59	11
5/31/2022	6	15	41	63	64	24
5/27/2022	3	14	40	53	54	8
5/24/2022	3	5	6	63	68	25
5/20/2022	33	40	59	60	69	22
5/17/2022	7	21	24	41	65	24
5/13/2022	11	41	43	44	65	13
5/10/2022	15	19	20	61	70	9
5/6/2022	16	21	33	52	70	10
5/3/2022	15	19	27	35	57	17
4/29/2022	9	11	34	49	66	15
4/26/2022	5	7	19	46	69	2
4/22/2022	7	28	29	58	59	10
4/19/2022	2	9	33	47	53	24
4/15/2022	4	17	20	46	64	23
4/12/2022	2	8	14	20	31	17
4/8/2022	8	11	29	32	40	2
4/5/2022	22	43	60	63	64	18
4/1/2022	26	42	47	48	63	21
3/29/2022	7	22	36	45	47	12
3/25/2022	3	13	42	51	58	17
3/22/2022	8	15	21	27	61	8
3/18/2022	2	6	25	40	45	5
3/15/2022	9	14	28	59	60	24
3/11/2022	24	28	39	44	66	25
3/8/2022	7	18	38	58	64	24
3/4/2022	11	19	28	46	47	5
3/1/2022	18	22	38	39	50	18
2/25/2022	15	31	40	56	66	4
2/22/2022	6	17	22	57	62	3
2/18/2022	6	11	50	63	68	17
2/15/2022	2	4	15	21	63	19
2/11/2022	11	16	23	24	30	24
2/8/2022	1	17	20	52	54	2
2/4/2022	7	16	34	44	61	24
2/1/2022	11	24	38	62	66	1
1/28/2022	3	16	25	44	55	13
1/25/2022	3	12	38	53	58	13
1/21/2022	38	45	46	55	67	18
1/18/2022	4	19	39	42	52	9
1/14/2022	5	8	13	22	48	25
1/11/2022	2	3	19	52	58	16
1/7/2022	7	29	43	56	57	6
1/4/2022	4	6	16	21	22	1
12/31/2021	2	5	30	46	61	8
12/28/2021	3	5	8	31	38	4
12/24/2021	16	17	25	36	37	16
12/21/2021	25	31	58	64	67	24
12/17/2021	21	32	38	48	62	10
12/14/2021	33	35	44	55	69	20
12/10/2021	23	25	40	42	60	8
12/7/2021	1	7	40	43	68	1
12/3/2021	22	45	48	58	61	13
11/30/2021	7	8	26	30	39	17
11/26/2021	7	27	37	42	59	2
11/23/2021	7	24	54	57	58	6
11/19/2021	5	23	52	53	59	18
11/16/2021	6	22	44	53	65	3
11/12/2021	30	32	42	46	48	15
11/9/2021	9	14	16	26	49	14
11/5/2021	10	15	20	66	68	18
11/2/2021	5	10	26	58	65	9
10/29/2021	15	26	28	35	45	4
10/26/2021	6	14	19	56	62	9
10/22/2021	9	14	26	29	66	22
10/19/2021	3	12	13	19	52	1
10/15/2021	3	20	31	34	65	18
10/12/2021	21	26	56	61	65	4
10/8/2021	21	24	36	40	70	22
10/5/2021	7	11	18	30	36	4
10/1/2021	21	25	36	62	63	6
9/28/2021	18	30	43	68	69	22
9/24/2021	17	21	27	43	56	15
9/21/2021	36	41	45	51	56	13
9/17/2021	17	32	40	59	61	18
9/14/2021	4	13	19	63	64	16
9/10/2021	20	32	35	47	64	18
9/7/2021	15	17	25	32	53	12
9/3/2021	7	10	12	61	65	3
8/31/2021	8	14	31	58	68	15
8/27/2021	1	10	44	47	56	23
8/24/2021	17	18	26	52	67	19
8/20/2021	41	43	51	57	70	1
8/17/2021	3	6	16	38	56	24
8/13/2021	17	21	35	40	53	11
8/10/2021	29	45	50	59	62	12
8/6/2021	9	18	40	46	69	9
8/3/2021	1	9	17	27	34	24
7/30/2021	19	26	31	52	68	10
7/27/2021	2	35	36	54	64	11
7/23/2021	13	17	19	40	69	17
7/20/2021	10	26	30	52	57	10
7/16/2021	24	25	47	52	57	24
7/13/2021	3	10	17	26	55	24
7/9/2021	6	37	39	41	46	17
7/6/2021	18	47	63	68	69	14
7/2/2021	8	31	32	34	45	19
6/29/2021	7	38	50	52	69	21
6/25/2021	17	20	42	45	65	12
6/22/2021	1	26	48	51	59	25
6/18/2021	14	36	44	46	53	18
6/15/2021	18	22	27	38	52	11
6/11/2021	4	43	56	63	68	13
6/8/2021	9	22	39	41	54	19
6/4/2021	4	30	34	41	64	8
6/1/2021	7	11	33	58	63	23
5/28/2021	10	14	20	47	70	15
5/25/2021	14	21	31	34	54	11
5/21/2021	6	9	17	18	48	8
5/18/2021	3	5	56	61	66	4
5/14/2021	3	18	41	44	68	3
5/11/2021	7	8	20	36	39	22
5/7/2021	5	10	19	21	50	10
5/4/2021	4	27	32	57	63	22
4/30/2021	8	19	26	48	49	5
4/27/2021	15	22	30	41	42	25
4/23/2021	4	28	29	30	60	25
4/20/2021	6	23	43	49	52	5
4/16/2021	17	27	28	50	55	25
4/13/2021	10	15	19	45	68	9
4/9/2021	22	26	27	58	66	12
4/6/2021	1	19	20	32	42	17
4/2/2021	10	42	48	53	62	19
3/30/2021	11	37	47	53	56	15
3/26/2021	4	25	37	46	67	15
3/23/2021	12	23	35	38	55	11
3/19/2021	9	14	40	58	69	8
3/16/2021	10	41	46	52	69	8
3/12/2021	2	24	25	31	65	18
3/9/2021	4	33	46	58	65	13
3/5/2021	10	11	17	27	54	20
3/2/2021	4	8	13	34	64	18
2/26/2021	11	15	37	62	64	5
2/23/2021	5	7	9	20	57	15
2/19/2021	27	32	47	50	53	4
2/16/2021	1	36	44	54	66	10
2/12/2021	5	14	24	25	27	14
2/9/2021	7	18	21	31	40	9
2/5/2021	14	17	28	29	44	2
2/2/2021	13	37	38	40	67	10
1/29/2021	4	44	58	59	70	3
1/26/2021	29	49	56	66	67	24
1/22/2021	4	26	42	50	60	24
1/19/2021	10	19	26	28	50	16
1/15/2021	3	11	12	38	43	15
1/12/2021	12	14	26	28	33	9
1/8/2021	3	6	16	18	58	11
1/5/2021	20	43	51	55	57	4
1/1/2021	8	24	53	68	69	7
12/29/2020	1	31	35	48	62	19
12/25/2020	17	23	36	69	70	19
12/22/2020	29	53	56	59	67	21
12/18/2020	7	15	25	51	60	5
12/15/2020	1	10	18	20	46	15
12/11/2020	19	31	37	55	67	25
12/8/2020	15	19	33	39	68	25
12/4/2020	3	19	24	44	50	8
12/1/2020	7	33	53	61	65	14
11/27/2020	4	10	27	35	58	10
11/24/2020	9	15	34	61	64	6
11/20/2020	26	33	45	61	68	17
11/17/2020	8	13	35	46	68	16
11/13/2020	6	7	14	28	59	7
11/10/2020	23	45	53	58	62	13
11/6/2020	18	24	27	34	60	2
11/3/2020	7	31	44	45	55	19
10/30/2020	14	19	34	39	59	11
10/27/2020	6	13	34	46	62	1
10/23/2020	18	34	44	60	69	22
10/20/2020	46	54	57	58	66	10
10/16/2020	27	32	50	52	57	12
10/13/2020	11	44	45	46	70	25
10/9/2020	5	11	25	27	64	13
10/6/2020	15	16	18	39	59	17
10/2/2020	9	38	47	49	68	25
9/29/2020	14	39	43	44	67	19