I've gone into detail to explain exactly what's needed beforehand and how to get it. If you follow these steps you'll receive a great, legitimate Ditto.

Step 1 - Prerequisites - Do these first; Save yourself time later.

Breed and hatch at least 20 eggs from the Nursery. If you don't have access to the nursery or don't know what it is you may save this post for later and go back to playing until you do.

Beat the Pokemon League and become champion. If you are not yet champion please consult the Rotom Dex.

Reach the Battle Tree on Poni Island and talk to the IV Judge. You hatched 20 eggs right? Congrats.

Step 2 - Item Procurement - Useful Stuff to Farm

You need Leppa Berries. They may be found on Melemele Island's Route 2 to the right of the Pokemon Center and Route 3 overlooking Kala'e Bay. They may also be found on Ula'ula Island's Route 17 and the Secluded Shore. It's good to plant a few in PokePelago's Isle Aplenny so you can build up a comfortable stock. You can't have too many. Get all 18 plots and keep farming. Get a ridiculous amount. If you find yourself asking yourself if you have too many first, call a doctor because that's crazy and second keep farming.

Buy as many Adrenaline Orbs as you can. 1 Adrenaline Orb = 1 chain = 1 Ditto = 1 chance = 1 name = 1 like = 1 prayer = 1 share = 1 permanent residency in the Nursery and a long lineage as a proud progenitor.. Follow the link and explore Locations and Shopping Details to find out how to get yours. Buy today! Go. Do it now.

Buy as many Pokeballs as you can. Ditto can be tricky and you may encounter a shiny. You've got to be prepared. Follow your own practical, or aesthetic reasons. If you're frugal you can follow this:

On the second island, after clearing the 3rd crystal trial and visiting the Battle Royal Dome, head over to the Mega-Mart directly to the Dome's right.

When you step foot into the store, the attendant hands you a coupon that returns half the money you spend at checkout. From here it should be pretty self-explanatory.

Go to the cashier that sells pokeballs.

Buy as many individual increments of 10 pokeballs (or 11 since it's faster) as you can afford. For each one of these you get a free premier ball.

When you are broke sell back all the pokeballs- you will regain 100% of the money you spent, but keep all your premier balls.

Repeat until you realize that premier balls kinda suck anyway. OR until you discover they can be sold for a whopping 10 poke-dollars. Cha-ching! Max money, that is if you want to waste hours just wearing out the buttons on your 3DS. - Source

Now that you have the items you'll need to acquire the right Pokemon. The aim is to have a Ditto at 1 HP that's transformed into a Pokemon that only knows Recycle; is holding a Leppa Berry and an Adrenaline orb has been used on it to maximize the chance that it calls for another Ditto. To do this you'll need a Pokemon with access to Recycle.

Go to the Move Reminder at Mount Lanakila's Pokémon Center on Ula'ula Island and re-teach Recycle to your Pokemon at the cost of a Heart Scale if the Pokemon doesn't already know it. Take note that move tutor remembers any move in the level-up moveset. Confirmed by Serebii. Then go to the Move Deleter in Hau'oli City on Melemele Island Pokemon Center to delete all other moves. Keep Recycle. You'd think that would be obvious but sadly you would be wrong. Don't do it. OK Good talk.

Step 4 - Utility Pokemon 2 - Pokemagicians

Now you'll need a way to get a Leppa Berry onto the Wild Ditto you'll be encountering. There are two moves that can do this best: Trick and Switcheroo. Bestow isn't used because Ditto could be holding one of its two Powder Items.

If you want to Trick the Leppa Berry on, you'll have to use either Kadabra/Alakazam. To get a Kadabra you'll have to evolve an Abra; raise it to lv 16 and let it evolve into Kadabra. Go back to the Move Reminder allow it to relearn Trick.

For those of you that didn't or don't want to raise a Kadabra (1 in 5 Wondertrades are an Abra for me btw) you have the option of Switcheroo.

Hypno 20% is the easiest option but Alolan Persian is another if you caught and raised an Alolan Meowth but it's a friendship evolution: Catch in a Friend or Luxury Ball and Tauros ride, feed berries pamper etc. When you have either Pokemon go to the Move Reminder and let it re-learn Switcheroo then give it a Leppa Berry to hold.

Step 4 - Utility Pokemon 3 - The Beatdown

Beating down your initial Ditto encounter to low health increases the chance that it will call for backup (E for Everyone). You'll need it to stay alive and remain unstatused so that it can keep calling it's family and watch as they all get wrecked. You'll need a Pokemon with a good physical attack stat and is able to use False Swipe. Take your pick, teach it False Swipe. [You may also want to teach it Substitute so that the incoming Ditto does not transform into your swiper.] Raise its level so it can fight. Then Beat It.

Step 5 - Am I ready to chain yet?

Nope. We've only just begun.

Grab your Netflix, get a drink, you're going to be at this for a while. Get something to take your mind off of the monotony unless you're a masochist, then enjoy I guess.

Check that your inventory is stocked as per step 1. Adjust as necessacary.

Save your game.

Step 7 I'm ready!

Exit the Pokemon center and go down route 10 and enter the first patch of grass. If you don't encounter a Ditto then run, rinse and repeat until you do. 10% Encounter

When you see a Ditto immediately use an an Adrenaline Orb. It will most likely be a Limber Ditto so it will need at least 1 turn to transform into your recycle user.

After Ditto transforms switch to your Tricker/Switcheroo user. On the next turn use Trick/Switcheroo to give the Ditto the Leppa Berry.

Then switch to your False Swipe user. On the next turn use Substitute. Then use False Swipe until you get Ditto down to 1 HP.

Ditto should call for help. When it does, knock out the incoming Ditto. Keep track of how many you KO.

On turns where there is no Ditto present you may attack Ditto with False Swipe, or use consumable items to pass the turn. You may also use another Adrenaline Orb without the inventory number lowering. You can use a revive on a Pokemon who isn't KO'ed to waste a turn and still have the revive.

Once you've reached a chain of 30, you may catch any of the incoming Ditto 31+. You must KO the initial Ditto encounter before catching the Ditto that was called Image Proof below:

After catching the Ditto, check it's stats by selecting "Judge" in the Pokemon's PC summary. If your party is already full, you can check its summary before sending it to the box or you may choose to set it in your party.

Repeat ad infinitum until you're satisfied. You may find it useful to use the markings to indicate which stats are perfect on your Ditto and the rest of your Pokemon general in order from left to right HP=Circle; ATK=Triangle; DEF=Square; SPA=Heart; SPD=Star; SPE=Diamond.

Calcs

Both stats are independently 1/32 of hitting max IV. Meaning 31/32 NOT being max.

Your chance of getting a perfect ditto at the point where you've chained it so you get 4 IVs is 1/32 X 1/32, giving you odds of 1/1024. With these odds the number of dittos you'd have to catch to give yourself a 90% chance of getting a perfect ditto is:

(1023/1024)x = 0.1

x log(1023/1024) = log(0.1)

x = 2357 rounded to an integer value.

Now I'll assume it takes about 30 minutes to chain and catch each ditto. This means that to get a 90% chance of catching a 6 IV ditto you would have to be catching dittos for 1178 and a half hours, or just over 49 days solid.

More calcs again?

(1/32)2=.097% chance of 6IV -

Numbers

According to Serebii, Ditto has a 10% encounter rate, so it's less rare to encounter a Ditto in the grass than it is to get a 5 IV Ditto after the 30th encounter in an SOS battle.

Using a geometric distribution, we can see that the probability of encountering a Ditto on Mount Hokulani as the kth Pokemon is found by:

P(Y = k) = p(1 - p)k , where p = 0.1 is the probability of encountering a Ditto, and Y is the number of failures.

Then we have the following table.

Number of Pokemon Encountered Before Ditto

Probability

0

10%

1

9%

2

8.1%

3

7.29%

4

6.561%

5

5.9049%

6

5.31441%

So there's a 52.17031% chance of encountering Ditto within your first 7 encounters.

Because of how short the time is between encounters, a 10% spawn rate seems much higher in a Pokemon game. That doesn't change the fact that it's still an uncommon-to-rare occurrence.

Using the same geometric distribution for the 5 IV Ditto, where p = 1/16 is the probability of getting a 5 IV Ditto, we have the following table:

Number of Strictly 4 IV Dittos Chained Before 5 IV

Probability

0

6.25%

1

5.859375%

2

5.4931640625%

3

5.14984130859375%

4

4.827976226806640625%

You can continue this process indefinitely. If you want to find the expected number of failures until the first success, then we use the following formula:

E[Y] = (1-p) / p , where p = 1/16 is the probability of success, and Y is the number of failures.

This gives us E[Y] = (1 - (1/16)) / (1/16) = 16 - 1 = 15. Hence, on average, we should get 15 4 IV Dittos, before our first 5 IV Ditto. The problem with this is that we have no idea which Ditto is a 5 IV until after we catch it, meaning we have to restart the chain if our catch was a failure.